BinaryGap

북마크 추가

String binary = Integer.toBinaryString(N);
String trim = binary.substring(0binary.lastIndexOf("1") + 1);
return Arrays.stream(trim.split("1")).mapToInt(a -> a.length()).max().orElse(0);

AD
관리자
2021-03-26 17:35
SHARE
 a.length()).max().orElse(0);">
keyboard_arrow_left
keyboard_arrow_up