結果
問題 |
No.589 Counting Even
|
ユーザー |
![]() |
提出日時 | 2025-08-23 15:57:04 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 331 bytes |
コンパイル時間 | 2,703 ms |
コンパイル使用メモリ | 171,236 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-08-23 15:57:11 |
合計ジャッジ時間 | 4,162 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#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; }