로딩
요청 처리 중입니다...

JAVA_Binary Watch_LeetCode 401

 JAVA_Binary Watch_LeetCode 401

JAVA_Binary Watch_LeetCode 401 풀이 class Solution { public List readBinaryWatch(int turnedOn) { List time = new ArrayList(); for (int h=0; h<12; h++){ for (int m=0; m<60; m++){ if (Integer.bitCount(h * 64 + m) == turnedOn) time.add(String.format("%d:%02d", h, m)); } } return time; } } * 출처 Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com...

# BinaryWatch_LeetCode401 # JAVA # JAVA_BinaryWatch # JAVA_BinaryWatch_LeetCode401 # JAVA_LeetCode401