結果

問題 No.589 Counting Even
ユーザー ミドリムシ
提出日時 2017-11-03 23:01:36
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 216 bytes
コンパイル時間 393 ms
コンパイル使用メモリ 53,720 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-22 16:16:12
合計ジャッジ時間 1,287 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11 WA * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
 
int main(){
    long N;
    cin >> N;
    long out_nums = 1;
    for(int i = N; i != 0; i /= 2){
        out_nums *= i % 2 + 1;
    }
    cout << N + 1 - out_nums << endl;
}
0