結果

問題 No.1465 Archaea
ユーザー 👑 KazunKazun
提出日時 2021-04-02 21:37:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 225 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 79,568 KB
最終ジャッジ日時 2023-08-25 11:42:48
合計ジャッジ時間 3,214 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,152 KB
testcase_01 AC 69 ms
71,568 KB
testcase_02 AC 76 ms
71,436 KB
testcase_03 AC 76 ms
71,316 KB
testcase_04 AC 73 ms
71,408 KB
testcase_05 AC 71 ms
71,264 KB
testcase_06 AC 71 ms
71,140 KB
testcase_07 AC 80 ms
77,148 KB
testcase_08 AC 71 ms
71,476 KB
testcase_09 AC 79 ms
77,504 KB
testcase_10 AC 70 ms
71,476 KB
testcase_11 AC 81 ms
77,416 KB
testcase_12 AC 75 ms
76,144 KB
testcase_13 AC 82 ms
78,716 KB
testcase_14 AC 80 ms
77,380 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 82 ms
78,832 KB
testcase_18 AC 79 ms
76,324 KB
testcase_19 WA -
testcase_20 AC 83 ms
78,284 KB
testcase_21 AC 83 ms
79,568 KB
testcase_22 AC 84 ms
79,564 KB
testcase_23 AC 70 ms
71,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())

inf=float("inf")
DP=[inf]*(N+1)
DP[1]=0

for a in range(2,N+1):
    if a>=3:
        DP[a]=min(DP[a],DP[a-3])

    if a%2==0:
        DP[a]=min(DP[a],DP[a//2])

print("YES" if DP[N]<=K else "NO")
0