結果
| 問題 |
No.1465 Archaea
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-29 19:29:15 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 534 bytes |
| コンパイル時間 | 111 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 95,432 KB |
| 最終ジャッジ日時 | 2024-07-16 04:17:13 |
| 合計ジャッジ時間 | 4,600 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 4 WA * 1 TLE * 1 -- * 14 |
ソースコード
N, K = map(int, input().split())
q = [N]
cnt = K
while cnt > 0:
nq = []
yes = False
for M in q:
if M % 2 == 0:
if M == 2:
cnt = 0
yes = True
break
else:
nq.append(M//2)
if M > 3:
if M == 4:
cnt = 0
yes = True
break
else:
nq.append(M-3)
if len(nq) == 0:
break
q = nq
cnt -= 1
print('YES' if yes else 'NO')