結果

問題 No.129 お年玉(2)
ユーザー convexineqconvexineq
提出日時 2020-12-05 00:20:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 744 ms / 5,000 ms
コード長 212 bytes
コンパイル時間 771 ms
コンパイル使用メモリ 86,648 KB
実行使用メモリ 79,696 KB
最終ジャッジ日時 2023-10-13 12:24:29
合計ジャッジ時間 20,949 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
76,948 KB
testcase_01 AC 744 ms
79,516 KB
testcase_02 AC 75 ms
71,320 KB
testcase_03 AC 74 ms
71,176 KB
testcase_04 AC 75 ms
71,236 KB
testcase_05 AC 350 ms
77,608 KB
testcase_06 AC 513 ms
78,352 KB
testcase_07 AC 605 ms
78,816 KB
testcase_08 AC 438 ms
77,792 KB
testcase_09 AC 564 ms
78,636 KB
testcase_10 AC 623 ms
78,816 KB
testcase_11 AC 421 ms
77,536 KB
testcase_12 AC 533 ms
78,664 KB
testcase_13 AC 552 ms
78,740 KB
testcase_14 AC 535 ms
78,520 KB
testcase_15 AC 456 ms
77,644 KB
testcase_16 AC 505 ms
78,236 KB
testcase_17 AC 598 ms
78,804 KB
testcase_18 AC 568 ms
78,612 KB
testcase_19 AC 601 ms
78,828 KB
testcase_20 AC 593 ms
78,756 KB
testcase_21 AC 727 ms
79,392 KB
testcase_22 AC 444 ms
77,892 KB
testcase_23 AC 645 ms
79,100 KB
testcase_24 AC 620 ms
78,804 KB
testcase_25 AC 427 ms
77,856 KB
testcase_26 AC 436 ms
77,972 KB
testcase_27 AC 424 ms
77,656 KB
testcase_28 AC 736 ms
79,696 KB
testcase_29 AC 75 ms
71,184 KB
testcase_30 AC 76 ms
71,096 KB
testcase_31 AC 80 ms
75,752 KB
testcase_32 AC 78 ms
75,836 KB
testcase_33 AC 86 ms
76,352 KB
testcase_34 AC 84 ms
76,428 KB
testcase_35 AC 85 ms
76,248 KB
testcase_36 AC 85 ms
76,500 KB
testcase_37 AC 84 ms
76,428 KB
testcase_38 AC 155 ms
76,936 KB
testcase_39 AC 194 ms
76,948 KB
testcase_40 AC 403 ms
77,624 KB
testcase_41 AC 286 ms
76,952 KB
testcase_42 AC 165 ms
76,980 KB
testcase_43 AC 165 ms
76,560 KB
testcase_44 AC 738 ms
79,256 KB
testcase_45 AC 127 ms
76,976 KB
testcase_46 AC 207 ms
76,688 KB
testcase_47 AC 715 ms
79,504 KB
testcase_48 AC 458 ms
78,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
m = int(input())
MOD = 10**9
dp = [0]*(m+1)
dp[0] = 1
for _ in range(m):
    ndp = dp[:]
    for j in range(m+1):
        ndp[j] += dp[j-1]
        ndp[j] %= MOD
    dp = ndp
print(dp[n//1000%m])
0