結果
| 問題 | No.47 ポケットを叩くとビスケットが2倍 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-09 16:24:04 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 422 bytes |
| 記録 | |
| コンパイル時間 | 1,558 ms |
| コンパイル使用メモリ | 179,132 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-08 10:39:15 |
| 合計ジャッジ時間 | 1,977 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 21 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const ll INF=1LL<<60;
int main(){
int n;cin >> n;
int ans=0;
for(int i=0;i<32;i++){
if((n>>i)&1){
ans++;
}
}
cout << ans << endl;
}