結果

問題 No.741 AscNumber(Easy)
ユーザー toshi1999110304toshi1999110304
提出日時 2020-10-23 00:46:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,074 ms / 2,000 ms
コード長 339 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 86,964 KB
実行使用メモリ 227,752 KB
最終ジャッジ日時 2023-09-28 14:59:43
合計ジャッジ時間 19,877 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,456 KB
testcase_01 AC 70 ms
71,292 KB
testcase_02 AC 70 ms
71,284 KB
testcase_03 AC 70 ms
71,320 KB
testcase_04 AC 71 ms
71,220 KB
testcase_05 AC 72 ms
71,520 KB
testcase_06 AC 71 ms
71,292 KB
testcase_07 AC 69 ms
71,448 KB
testcase_08 AC 71 ms
71,292 KB
testcase_09 AC 71 ms
71,424 KB
testcase_10 AC 73 ms
71,452 KB
testcase_11 AC 69 ms
71,296 KB
testcase_12 AC 71 ms
71,348 KB
testcase_13 AC 73 ms
71,296 KB
testcase_14 AC 71 ms
71,516 KB
testcase_15 AC 71 ms
71,292 KB
testcase_16 AC 71 ms
71,292 KB
testcase_17 AC 70 ms
71,508 KB
testcase_18 AC 74 ms
75,940 KB
testcase_19 AC 75 ms
75,992 KB
testcase_20 AC 77 ms
76,548 KB
testcase_21 AC 77 ms
76,464 KB
testcase_22 AC 78 ms
76,532 KB
testcase_23 AC 80 ms
76,540 KB
testcase_24 AC 78 ms
76,516 KB
testcase_25 AC 79 ms
76,120 KB
testcase_26 AC 79 ms
76,540 KB
testcase_27 AC 78 ms
76,520 KB
testcase_28 AC 77 ms
76,480 KB
testcase_29 AC 77 ms
76,548 KB
testcase_30 AC 78 ms
76,540 KB
testcase_31 AC 77 ms
76,520 KB
testcase_32 AC 76 ms
76,332 KB
testcase_33 AC 78 ms
76,480 KB
testcase_34 AC 77 ms
76,536 KB
testcase_35 AC 1,022 ms
220,592 KB
testcase_36 AC 505 ms
140,080 KB
testcase_37 AC 579 ms
151,248 KB
testcase_38 AC 567 ms
150,132 KB
testcase_39 AC 494 ms
138,540 KB
testcase_40 AC 628 ms
160,856 KB
testcase_41 AC 957 ms
208,352 KB
testcase_42 AC 545 ms
147,228 KB
testcase_43 AC 415 ms
127,384 KB
testcase_44 AC 767 ms
180,136 KB
testcase_45 AC 819 ms
187,992 KB
testcase_46 AC 974 ms
214,152 KB
testcase_47 AC 237 ms
100,400 KB
testcase_48 AC 978 ms
214,108 KB
testcase_49 AC 833 ms
191,636 KB
testcase_50 AC 185 ms
92,484 KB
testcase_51 AC 434 ms
130,544 KB
testcase_52 AC 1,073 ms
227,568 KB
testcase_53 AC 1,074 ms
227,752 KB
testcase_54 AC 1,073 ms
226,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
mod = 10 ** 9 + 7
dp = [[0] * 10 for i in range(N + 1)]
dp[0][0] = 1
for i in range(N):
    for j in range(10):
        for k in range(9, j - 1, -1):
            #if k >= j:
            dp[i + 1][k] += dp[i][j] % mod
            dp[i + 1][k] %= mod
ans = 0
for i in range(10):
    ans += dp[N][i]
    ans %= mod
print(ans)
0