結果

問題 No.1465 Archaea
ユーザー googol_S0googol_S0
提出日時 2021-04-02 21:22:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 187 bytes
コンパイル時間 659 ms
コンパイル使用メモリ 86,744 KB
実行使用メモリ 79,100 KB
最終ジャッジ日時 2023-08-25 16:09:10
合計ジャッジ時間 3,835 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,364 KB
testcase_01 AC 74 ms
71,288 KB
testcase_02 AC 75 ms
71,292 KB
testcase_03 AC 73 ms
71,020 KB
testcase_04 AC 74 ms
71,308 KB
testcase_05 AC 74 ms
71,340 KB
testcase_06 AC 74 ms
71,292 KB
testcase_07 AC 84 ms
76,720 KB
testcase_08 AC 76 ms
71,096 KB
testcase_09 AC 84 ms
77,024 KB
testcase_10 AC 74 ms
71,196 KB
testcase_11 AC 84 ms
76,836 KB
testcase_12 AC 79 ms
75,644 KB
testcase_13 AC 85 ms
78,220 KB
testcase_14 AC 82 ms
76,668 KB
testcase_15 AC 77 ms
75,636 KB
testcase_16 AC 81 ms
75,656 KB
testcase_17 AC 85 ms
78,216 KB
testcase_18 AC 79 ms
75,852 KB
testcase_19 AC 79 ms
76,732 KB
testcase_20 AC 84 ms
77,660 KB
testcase_21 AC 85 ms
79,100 KB
testcase_22 AC 86 ms
78,844 KB
testcase_23 AC 75 ms
71,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
DP=[K+1]*(N*2+10)
DP[1]=0
for i in range(1,N+1):
  DP[i+3]=min(DP[i+3],DP[i]+1)
  DP[i*2]=min(DP[i*2],DP[i]+1)
if DP[N]<=K:
  print('YES')
else:
  print('NO')
0