Submission #71534
ソースコード
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 33 | #include<bits/stdc++.h> #define dou double #define ll long long #define all(x) x.begin(),x.end() #define gre greater<>() #define int2 int,int #define pb push_back #define mp make_pair #define emp emplace #define rep(i,a,n) for(int i=(int)(a);i<(int)(n);i++) #define p_rep(i,a,n) for(int i=(int)(a);i<=(int)(n);i++) #define r_rep(i,a,n) for(int i=(int)(a);i>(int)(n);i--) #define rp_rep(i,a,n) for(int i=(int)(a);i>=(int)(n);i--) #define fir first #define sec second #define uns unsigned #define fix(x,k) fixed<<setprecision(k)<<x #define total(n) n*(n+1)/2 //nまでの総和 #define lcm(a,b) (a*b)/__gcd(a,b) //aとbの最小公倍数 #define Yes cout<<"Yes\n" #define No cout<<"No\n" #define vi vector<int> #define vs vector<string> #define uni(x) x.erase(unique(x.begin(),x.end()), x.end()) //vector重複削除 #define outSM(x) for(auto i=x.begin();i!=x.end();i++) //set,map出力用ループ #define inf 1e9 #define mod inf+7 using namespace std; int main(){ int n; cin>>n; cout<<__builtin_popcount(n)<< "\n" ; return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 1123 - こんなの一瞬だろ |
ユーザー名 | ei2113 |
投稿日時 | 2022-07-27 11:35:37 |
言語 | C++17 |
状態 | Accepted |
得点 | 1 |
ソースコード長 | 1134 Byte |
最大実行時間 | 30 ms |
最大メモリ使用量 | 632 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 1 / 1 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
input-sample1 | AC | 22 ms | 604 KB |
1
|
input-sample2 | AC | 20 ms | 448 KB |
1
|
input01 | AC | 18 ms | 420 KB |
1
|
input02 | AC | 21 ms | 520 KB |
1
|
input03 | AC | 26 ms | 488 KB |
1
|
input04 | AC | 25 ms | 584 KB |
1
|
input05 | AC | 21 ms | 560 KB |
1
|
input06 | AC | 27 ms | 532 KB |
1
|
input07 | AC | 21 ms | 632 KB |
1
|
input08 | AC | 24 ms | 476 KB |
1
|
input09 | AC | 18 ms | 576 KB |
1
|
input10 | AC | 22 ms | 552 KB |
1
|
input11 | AC | 27 ms | 528 KB |
1
|
input12 | AC | 30 ms | 632 KB |
1
|
input13 | AC | 20 ms | 480 KB |
1
|
input14 | AC | 23 ms | 584 KB |
1
|
input15 | AC | 14 ms | 552 KB |
1
|