結果

問題 No.741 AscNumber(Easy)
ユーザー shobonvipshobonvip
提出日時 2021-05-02 00:50:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,284 ms / 2,000 ms
コード長 229 bytes
コンパイル時間 1,002 ms
コンパイル使用メモリ 87,008 KB
実行使用メモリ 228,412 KB
最終ジャッジ日時 2023-09-27 13:50:00
合計ジャッジ時間 21,443 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
71,288 KB
testcase_01 AC 61 ms
71,400 KB
testcase_02 AC 60 ms
71,556 KB
testcase_03 AC 62 ms
71,200 KB
testcase_04 AC 61 ms
71,200 KB
testcase_05 AC 61 ms
71,436 KB
testcase_06 AC 63 ms
71,320 KB
testcase_07 AC 61 ms
71,464 KB
testcase_08 AC 63 ms
71,536 KB
testcase_09 AC 61 ms
71,280 KB
testcase_10 AC 62 ms
71,400 KB
testcase_11 AC 62 ms
71,308 KB
testcase_12 AC 61 ms
71,228 KB
testcase_13 AC 61 ms
71,136 KB
testcase_14 AC 63 ms
71,288 KB
testcase_15 AC 62 ms
71,356 KB
testcase_16 AC 62 ms
71,476 KB
testcase_17 AC 60 ms
71,532 KB
testcase_18 AC 62 ms
74,944 KB
testcase_19 AC 63 ms
75,148 KB
testcase_20 AC 87 ms
76,744 KB
testcase_21 AC 72 ms
76,524 KB
testcase_22 AC 78 ms
76,696 KB
testcase_23 AC 76 ms
76,560 KB
testcase_24 AC 69 ms
76,312 KB
testcase_25 AC 71 ms
76,428 KB
testcase_26 AC 78 ms
76,784 KB
testcase_27 AC 71 ms
76,504 KB
testcase_28 AC 73 ms
76,428 KB
testcase_29 AC 69 ms
76,188 KB
testcase_30 AC 74 ms
76,684 KB
testcase_31 AC 75 ms
76,592 KB
testcase_32 AC 63 ms
75,500 KB
testcase_33 AC 75 ms
76,788 KB
testcase_34 AC 74 ms
76,556 KB
testcase_35 AC 1,173 ms
221,404 KB
testcase_36 AC 570 ms
140,480 KB
testcase_37 AC 671 ms
151,432 KB
testcase_38 AC 682 ms
150,684 KB
testcase_39 AC 570 ms
139,588 KB
testcase_40 AC 763 ms
161,428 KB
testcase_41 AC 1,137 ms
208,764 KB
testcase_42 AC 645 ms
147,268 KB
testcase_43 AC 480 ms
128,044 KB
testcase_44 AC 885 ms
180,808 KB
testcase_45 AC 1,033 ms
188,532 KB
testcase_46 AC 1,221 ms
214,340 KB
testcase_47 AC 271 ms
100,736 KB
testcase_48 AC 1,131 ms
214,344 KB
testcase_49 AC 1,013 ms
192,140 KB
testcase_50 AC 207 ms
93,268 KB
testcase_51 AC 529 ms
130,668 KB
testcase_52 AC 1,282 ms
228,412 KB
testcase_53 AC 1,284 ms
228,096 KB
testcase_54 AC 1,241 ms
227,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
mod = 10**9 + 7

dp = [[0]*10 for _ in range(n+1)]
# dp[i][j] := i桁目までで, jが最高位.
dp[0][0] = 1

for i in range(n):
	for j in range(10):
		dp[i+1][j] = sum(dp[i][0:j+1]) % mod
print(sum(dp[n])%mod)
0