結果
問題 |
No.680 作れる数
|
ユーザー |
![]() |
提出日時 | 2018-07-26 22:02:26 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 2,000 ms |
コード長 | 280 bytes |
コンパイル時間 | 86 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-07-01 03:25:08 |
合計ジャッジ時間 | 1,732 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
N = int(input()) t = 1 sum_t = t t_list = [] while sum_t<=N: t_list.append(sum_t) t *= 2 sum_t += t s = 0 t_list.reverse() for i in t_list: if s+i <= N: s += i if s==N: print("YES") exit(0) print("YES" if N==0 else "NO")