結果
| 問題 |
No.589 Counting Even
|
| コンテスト | |
| ユーザー |
kurenai3110
|
| 提出日時 | 2017-11-03 22:48:41 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 298 bytes |
| コンパイル時間 | 417 ms |
| コンパイル使用メモリ | 58,748 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-22 16:10:17 |
| 合計ジャッジ時間 | 1,253 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 23 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
int main()
{
long long N; cin >> N;
long long ans = 0;
if (N) {
int cnt = 0;
while (N) {
ans += !(N & 1) * (1 << cnt);
N >>= 1;
cnt++;
}
}
cout << ans << endl;
return 0;
}
kurenai3110