結果
| 問題 | No.589 Counting Even |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-08-23 15:57:04 |
| 言語 | C++17(clang) (clang++ 23.1.4 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 617µs | |
| コード長 | 331 bytes |
| 記録 | |
| コンパイル時間 | 4,489 ms |
| コンパイル使用メモリ | 164,676 KB |
| 実行使用メモリ | 9,908 KB |
| 最終ジャッジ日時 | 2026-10-28 16:27:53 |
| 合計ジャッジ時間 | 6,266 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge7_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#include<bits/stdc++.h>
#define int long long
#define endl '\n'
using namespace std;
int x;
signed main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
// freopen("even.in","r",stdin);
// freopen("even.out","w",stdout);
cin >> x;
int tx = x,ans = 1;
while(x)ans *= ((x & 1) + 1),x >>= 1;
cout << (tx + 1) - ans;
}
vjudge1