結果
| 問題 | No.680 作れる数 |
| コンテスト | |
| ユーザー |
bal4u
|
| 提出日時 | 2019-05-17 06:04:28 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 325 bytes |
| 記録 | |
| コンパイル時間 | 149 ms |
| コンパイル使用メモリ | 28,800 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-17 05:46:24 |
| 合計ジャッジ時間 | 797 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 WA * 8 |
ソースコード
// yukicoder: No.680 作れる数
// 2019.5.14 bal4u
#include <stdio.h>
int main()
{
int i, N, s, t, ans;
int min, max;
scanf("%d", &N);
min = max = 0, t = 1, ans = 0;
while (min < N) {
t <<= 1;
min += t, max += (t << 1)-1;
if (min <= N && N <= max) { ans = 1; break; }
}
puts(ans? "YES": "NO");
return 0;
}
bal4u