Submission #52999


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include<bits/stdc++.h>
using namespace std;
signed main(){
cin.tie(NULL);
ios::sync_with_stdio(false);
long long n,sum=0;
cin>>n;
while(n!=0){
if(n%2==1) sum++;
n/=2;
}
cout<<sum<<'\n';
return(0);
}

ステータス

項目 データ
問題 1123 - こんなの一瞬だろ
ユーザー名 NASSUN_ei1906
投稿日時 2019-08-20 09:51:30
言語 C++
状態 Accepted
得点 1
ソースコード長 238 Byte
最大実行時間 35 ms
最大メモリ使用量 732 KB

セット

セット 得点 Cases
1 ALL 1 / 1 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
input-sample1 AC 35 ms 604 KB
1
input-sample2 AC 22 ms 560 KB
1
input01 AC 28 ms 644 KB
1
input02 AC 23 ms 596 KB
1
input03 AC 22 ms 548 KB
1
input04 AC 20 ms 632 KB
1
input05 AC 26 ms 588 KB
1
input06 AC 19 ms 668 KB
1
input07 AC 21 ms 620 KB
1
input08 AC 17 ms 576 KB
1
input09 AC 22 ms 532 KB
1
input10 AC 18 ms 616 KB
1
input11 AC 24 ms 568 KB
1
input12 AC 17 ms 648 KB
1
input13 AC 30 ms 732 KB
1
input14 AC 26 ms 680 KB
1
input15 AC 23 ms 636 KB
1