結果
問題 | No.589 Counting Even |
ユーザー |
|
提出日時 | 2017-11-08 17:44:42 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 199 bytes |
コンパイル時間 | 496 ms |
コンパイル使用メモリ | 65,144 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 06:00:55 |
合計ジャッジ時間 | 1,244 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include <iostream>using namespace std;using ll = long long;int main(){ll N;cin >> N;ll M = N;int cnt=0;while(N>0){if(N%2 == 1){cnt++;}N/=2;}cout << M-(1LL<<cnt)+1 << endl;return 0;}