結果
問題 |
No.1465 Archaea
|
ユーザー |
|
提出日時 | 2022-10-30 02:02:42 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 78 ms / 2,000 ms |
コード長 | 397 bytes |
コンパイル時間 | 281 ms |
コンパイル使用メモリ | 82,248 KB |
実行使用メモリ | 97,920 KB |
最終ジャッジ日時 | 2024-07-06 21:46:46 |
合計ジャッジ時間 | 2,126 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
ソースコード
n, k = map(int, input().split()) seen = set([1]) L = [1] for _ in range(k): NL = [] while L: a = L.pop() b = 2 * a c = a + 3 if b <= n and b not in seen: seen.add(b) NL.append(b) if c <= n and c not in seen: seen.add(c) NL.append(c) L = NL[:] if n in seen: print("YES") else: print("NO")