結果

問題 No.1465 Archaea
ユーザー y61mpnly61mpnl
提出日時 2021-04-02 21:50:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 176 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 10,756 KB
実行使用メモリ 9,704 KB
最終ジャッジ日時 2023-08-25 16:12:55
合計ジャッジ時間 5,652 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 169 ms
9,540 KB
testcase_01 AC 161 ms
9,444 KB
testcase_02 AC 162 ms
9,692 KB
testcase_03 AC 163 ms
9,444 KB
testcase_04 AC 162 ms
9,596 KB
testcase_05 AC 174 ms
9,544 KB
testcase_06 AC 176 ms
9,536 KB
testcase_07 AC 164 ms
9,540 KB
testcase_08 AC 163 ms
9,576 KB
testcase_09 AC 162 ms
9,572 KB
testcase_10 AC 162 ms
9,600 KB
testcase_11 AC 165 ms
9,644 KB
testcase_12 AC 161 ms
9,536 KB
testcase_13 AC 166 ms
9,532 KB
testcase_14 AC 164 ms
9,576 KB
testcase_15 AC 166 ms
9,552 KB
testcase_16 AC 170 ms
9,516 KB
testcase_17 AC 166 ms
9,552 KB
testcase_18 AC 164 ms
9,528 KB
testcase_19 AC 160 ms
9,648 KB
testcase_20 AC 163 ms
9,444 KB
testcase_21 AC 166 ms
9,704 KB
testcase_22 AC 169 ms
9,692 KB
testcase_23 AC 169 ms
9,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())

dp = [1e9] * 200010
dp[1] = 0
for i in range(200010):
	if i+3<200010:
		dp[i+3] = min(dp[i+3], dp[i] + 1)
	if i*2<200010:
		dp[i*2] = min(dp[i*2], dp[i] + 1)
print("YNEOS"[dp[n]>k::2])
0