結果

問題 No.1465 Archaea
ユーザー 小野寺健
提出日時 2021-04-29 19:28:27
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 534 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 96,168 KB
最終ジャッジ日時 2024-07-16 04:16:30
合計ジャッジ時間 4,595 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 3 WA * 2 TLE * 1 -- * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

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')
0