結果

問題 No.741 AscNumber(Easy)
ユーザー toshi1999110304toshi1999110304
提出日時 2020-10-23 23:46:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 899 ms / 2,000 ms
コード長 296 bytes
コンパイル時間 390 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 228,000 KB
最終ジャッジ日時 2023-09-28 19:05:57
合計ジャッジ時間 19,269 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,196 KB
testcase_01 AC 76 ms
71,240 KB
testcase_02 AC 75 ms
71,220 KB
testcase_03 AC 74 ms
71,064 KB
testcase_04 AC 76 ms
70,876 KB
testcase_05 AC 73 ms
70,976 KB
testcase_06 AC 75 ms
71,220 KB
testcase_07 AC 74 ms
70,876 KB
testcase_08 AC 76 ms
71,184 KB
testcase_09 AC 75 ms
70,740 KB
testcase_10 AC 77 ms
71,228 KB
testcase_11 AC 75 ms
71,104 KB
testcase_12 AC 75 ms
70,984 KB
testcase_13 AC 76 ms
70,992 KB
testcase_14 AC 76 ms
70,728 KB
testcase_15 AC 77 ms
71,176 KB
testcase_16 AC 77 ms
70,780 KB
testcase_17 AC 77 ms
71,192 KB
testcase_18 AC 79 ms
75,572 KB
testcase_19 AC 80 ms
75,372 KB
testcase_20 AC 85 ms
76,268 KB
testcase_21 AC 83 ms
76,184 KB
testcase_22 AC 86 ms
76,324 KB
testcase_23 AC 85 ms
76,080 KB
testcase_24 AC 81 ms
76,172 KB
testcase_25 AC 83 ms
76,044 KB
testcase_26 AC 82 ms
76,260 KB
testcase_27 AC 83 ms
76,044 KB
testcase_28 AC 81 ms
76,124 KB
testcase_29 AC 84 ms
75,864 KB
testcase_30 AC 82 ms
76,196 KB
testcase_31 AC 82 ms
76,296 KB
testcase_32 AC 80 ms
76,216 KB
testcase_33 AC 82 ms
76,324 KB
testcase_34 AC 83 ms
76,296 KB
testcase_35 AC 899 ms
220,264 KB
testcase_36 AC 414 ms
139,960 KB
testcase_37 AC 474 ms
151,068 KB
testcase_38 AC 472 ms
149,932 KB
testcase_39 AC 411 ms
138,692 KB
testcase_40 AC 525 ms
160,736 KB
testcase_41 AC 778 ms
207,724 KB
testcase_42 AC 454 ms
146,772 KB
testcase_43 AC 352 ms
127,524 KB
testcase_44 AC 637 ms
180,152 KB
testcase_45 AC 667 ms
187,632 KB
testcase_46 AC 800 ms
213,608 KB
testcase_47 AC 211 ms
100,540 KB
testcase_48 AC 798 ms
213,616 KB
testcase_49 AC 694 ms
191,284 KB
testcase_50 AC 170 ms
92,836 KB
testcase_51 AC 368 ms
129,984 KB
testcase_52 AC 882 ms
227,868 KB
testcase_53 AC 880 ms
228,000 KB
testcase_54 AC 868 ms
226,112 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):
            dp[i + 1][k] += dp[i][j] % mod
            
ans = 0
for i in range(10):
    ans += dp[N][i]
    ans %= mod
print(ans)
0