結果

問題 No.741 AscNumber(Easy)
ユーザー toshi1999110304toshi1999110304
提出日時 2020-10-23 00:40:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,956 ms / 2,000 ms
コード長 336 bytes
コンパイル時間 1,047 ms
コンパイル使用メモリ 86,896 KB
実行使用メモリ 227,764 KB
最終ジャッジ日時 2023-09-28 14:58:20
合計ジャッジ時間 31,164 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,116 KB
testcase_01 AC 78 ms
71,236 KB
testcase_02 AC 79 ms
71,124 KB
testcase_03 AC 77 ms
71,236 KB
testcase_04 AC 78 ms
71,236 KB
testcase_05 AC 76 ms
71,072 KB
testcase_06 AC 79 ms
71,140 KB
testcase_07 AC 77 ms
71,228 KB
testcase_08 AC 78 ms
71,100 KB
testcase_09 AC 78 ms
71,232 KB
testcase_10 AC 84 ms
75,672 KB
testcase_11 AC 80 ms
75,840 KB
testcase_12 AC 80 ms
75,928 KB
testcase_13 AC 82 ms
75,624 KB
testcase_14 AC 82 ms
75,992 KB
testcase_15 AC 81 ms
75,608 KB
testcase_16 AC 82 ms
76,324 KB
testcase_17 AC 81 ms
76,356 KB
testcase_18 AC 81 ms
76,184 KB
testcase_19 AC 83 ms
76,332 KB
testcase_20 AC 89 ms
76,400 KB
testcase_21 AC 85 ms
76,288 KB
testcase_22 AC 87 ms
76,044 KB
testcase_23 AC 85 ms
76,348 KB
testcase_24 AC 82 ms
76,268 KB
testcase_25 AC 83 ms
76,360 KB
testcase_26 AC 84 ms
76,192 KB
testcase_27 AC 85 ms
76,344 KB
testcase_28 AC 83 ms
76,360 KB
testcase_29 AC 85 ms
76,280 KB
testcase_30 AC 86 ms
76,300 KB
testcase_31 AC 86 ms
76,356 KB
testcase_32 AC 85 ms
76,348 KB
testcase_33 AC 85 ms
76,196 KB
testcase_34 AC 85 ms
76,372 KB
testcase_35 AC 1,874 ms
220,204 KB
testcase_36 AC 866 ms
139,860 KB
testcase_37 AC 1,000 ms
151,048 KB
testcase_38 AC 983 ms
149,684 KB
testcase_39 AC 852 ms
138,792 KB
testcase_40 AC 1,125 ms
160,520 KB
testcase_41 AC 1,706 ms
208,220 KB
testcase_42 AC 946 ms
146,912 KB
testcase_43 AC 712 ms
127,464 KB
testcase_44 AC 1,353 ms
179,996 KB
testcase_45 AC 1,462 ms
187,964 KB
testcase_46 AC 1,782 ms
213,848 KB
testcase_47 AC 375 ms
100,280 KB
testcase_48 AC 1,770 ms
213,812 KB
testcase_49 AC 1,496 ms
191,044 KB
testcase_50 AC 277 ms
92,804 KB
testcase_51 AC 750 ms
130,212 KB
testcase_52 AC 1,956 ms
227,684 KB
testcase_53 AC 1,954 ms
227,764 KB
testcase_54 AC 1,937 ms
226,640 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(10):
            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