Submission #58001
ソースコード
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 26 27 28 29 30 31 32 | #include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(n);++i) #define reps(i,n) for(int i=1;i<=(n);++i) #define all(x) (x).begin(),(x).end() #define setout(n,x) setw(n+1) << setfill(x) #define Fixed fixed << setprecision(14) #define int int64_t using pii = pair< int , int >; constexpr int INF = 0x3f3f3f3f; constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL; constexpr int mod = 1e9+7; template < class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true ); } template < class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true ); } template < class T> using min_heap = priority_queue<T,vector<T>,greater<T> >; template < class T> using max_heap = priority_queue<T>; int gcd( int a, int b){ return b ? gcd(b,a % b) : a;} int lcm( int a, int b){ return a / gcd(a,b) * b;} signed main(){ cin.tie(0); ios::sync_with_stdio( false ); int n; cin >> n; cout << __builtin_popcount(n) << '\n' ; return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 1123 - こんなの一瞬だろ |
ユーザー名 | ei1903 |
投稿日時 | 2020-01-04 18:46:03 |
言語 | C++14 |
状態 | Accepted |
得点 | 1 |
ソースコード長 | 1026 Byte |
最大実行時間 | 31 ms |
最大メモリ使用量 | 660 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 1 / 1 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
input-sample1 | AC | 31 ms | 604 KB |
1
|
input-sample2 | AC | 21 ms | 428 KB |
1
|
input01 | AC | 18 ms | 516 KB |
1
|
input02 | AC | 25 ms | 468 KB |
1
|
input03 | AC | 27 ms | 428 KB |
1
|
input04 | AC | 21 ms | 516 KB |
1
|
input05 | AC | 23 ms | 468 KB |
1
|
input06 | AC | 29 ms | 552 KB |
1
|
input07 | AC | 19 ms | 628 KB |
1
|
input08 | AC | 19 ms | 584 KB |
1
|
input09 | AC | 19 ms | 540 KB |
1
|
input10 | AC | 30 ms | 496 KB |
1
|
input11 | AC | 22 ms | 576 KB |
1
|
input12 | AC | 22 ms | 660 KB |
1
|
input13 | AC | 31 ms | 616 KB |
1
|
input14 | AC | 21 ms | 572 KB |
1
|
input15 | AC | 24 ms | 532 KB |
1
|