結果
問題 |
No.680 作れる数
|
ユーザー |
![]() |
提出日時 | 2018-05-07 20:34:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 464 bytes |
コンパイル時間 | 91 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 37,760 KB |
最終ジャッジ日時 | 2024-06-28 02:19:34 |
合計ジャッジ時間 | 3,914 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 7 TLE * 1 -- * 12 |
ソースコード
N = int(input()) # 1 s = 0 t = 0 NEXTqueue = [(0,0)] # 計算待ちキュー can = False while True: if len(NEXTqueue) == 0: break s,t = NEXTqueue.pop(0) # 2 t *= 2 # 3 # 4 #s += t if s+t == N or s+t+1 == N: can = True break NEXTqueue.append((s+t, t)) NEXTqueue.append((s+t+1, t+1)) if NEXTqueue[-1][0] > N: break if can: print('Yes') else: print('No')