結果
問題 |
No.47 ポケットを叩くとビスケットが2倍
|
ユーザー |
|
提出日時 | 2020-03-09 16:24:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 422 bytes |
コンパイル時間 | 1,617 ms |
コンパイル使用メモリ | 165,332 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 03:18:50 |
合計ジャッジ時間 | 2,564 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }