Submission #77192


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <bits/stdc++.h>
#define endl "\n"
#define INF INT_MAX
using namespace std;
int main(){
#define int long long
cin.tie(nullptr);ios::sync_with_stdio(false);
int n;
cin >>n;
int ans = 0;
while(n != 0){
ans += (n&1);
n /= 2;
}
cout <<ans<<endl;
}

ステータス

項目 データ
問題 1123 - こんなの一瞬だろ
ユーザー名 ei2332
投稿日時 2023-11-14 17:09:58
言語 C++17
状態 Accepted
得点 1
ソースコード長 274 Byte
最大実行時間 36 ms
最大メモリ使用量 712 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
input-sample1 AC 32 ms 604 KB
1
input-sample2 AC 18 ms 684 KB
1
input01 AC 24 ms 636 KB
1
input02 AC 24 ms 592 KB
1
input03 AC 18 ms 548 KB
1
input04 AC 26 ms 632 KB
1
input05 AC 22 ms 712 KB
1
input06 AC 22 ms 672 KB
1
input07 AC 27 ms 628 KB
1
input08 AC 24 ms 452 KB
1
input09 AC 27 ms 536 KB
1
input10 AC 36 ms 616 KB
1
input11 AC 27 ms 572 KB
1
input12 AC 21 ms 660 KB
1
input13 AC 24 ms 488 KB
1
input14 AC 28 ms 700 KB
1
input15 AC 18 ms 660 KB
1