```
public class Solution {
public List<String> readBinaryWatch(int num) {
ArrayList<String> times = new ArrayList<String>();
for (int hour = 0; hour < 12; hour++) {
if(getCount(hour) <= num) {
for (int min = 0; min < 60; min++) {
if(getCount(hour) + getCount(min) == num) {
times.add(hour+":"+ (min < 10 ? "0"+min : min));
}
}
}
}
return times;
}
private int getCount(int n) {
int count = 0;
while(n > 0) {
count += n & 1;
n >>= 1;
}
return count;
}
}
```