結果
問題 |
No.680 作れる数
|
ユーザー |
|
提出日時 | 2018-05-09 14:54:46 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 275 bytes |
コンパイル時間 | 1,328 ms |
コンパイル使用メモリ | 157,276 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 02:43:35 |
合計ジャッジ時間 | 2,062 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include "bits/stdc++.h" using namespace std; int main() { int N; cin >> N; for(int i = 30; i > 0; i--) { long long x = (1 << i) - 1; if(N >= x) N -= x; } if(N == 0) cout << "YES" << endl; else cout << "NO" << endl; return 0; }