hiho week 181 register

Ended

Participants:243

Verdict:Accepted
Score:100 / 100
Submitted:2017-12-23 16:13:45

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <iostream>
#include <string>
using namespace std;
int main() {
    int x;
    cin >> x;
    for(int i = 0; i<(1<<11); i++) {
        int y = 0;
        for(int j = 0; j < 11; j++) {
            if((i>>j) & 1) y++;
        }
        if(x==y) {
            int a,b;
            a = i/(1<<6);
            b = i%(1<<6);
            if(a<24 && b<60)
            printf("%02d:%02d\n",i/(1<<6),i%(1<<6));
        }
    }
    return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX