Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 3x 1x 2x 2x 24x 1440x 11x 2x | export default function readBinaryWatch(turnedOn: number): string[] {
if (turnedOn > 8)
return []
const result: string[] = []
for (let h = 0; h < 12; ++h) {
for (let m = 0; m < 60; ++m) {
if (
h.toString(2).split('0').join('').length
+ m.toString(2).split('0').join('').length
=== turnedOn
) {
result.push(`${h}:${m < 10 ? '0' : ''}${m}`)
}
}
}
return result
}
|