結果
問題 |
No.378 名声値を稼ごう
|
ユーザー |
![]() |
提出日時 | 2021-02-14 11:44:21 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 228 bytes |
コンパイル時間 | 1,857 ms |
コンパイル使用メモリ | 191,152 KB |
最終ジャッジ日時 | 2025-01-18 20:17:31 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<n;i++) int main(){ ll n; cin>>n; int ans=0; while(n){ ans+=n%2; n/=2; } cout<<ans<<endl; return 0; }