結果

問題 No.741 AscNumber(Easy)
ユーザー stngstng
提出日時 2022-05-28 16:39:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 949 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 2,036 ms
コンパイル使用メモリ 81,636 KB
実行使用メモリ 226,348 KB
最終ジャッジ日時 2023-10-20 23:23:14
合計ジャッジ時間 16,057 ms
ジャッジサーバーID
(参考情報)
judge15 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,340 KB
testcase_01 AC 36 ms
53,340 KB
testcase_02 AC 35 ms
53,340 KB
testcase_03 AC 36 ms
53,340 KB
testcase_04 AC 35 ms
53,340 KB
testcase_05 AC 36 ms
53,340 KB
testcase_06 AC 37 ms
53,340 KB
testcase_07 AC 36 ms
53,340 KB
testcase_08 AC 36 ms
53,340 KB
testcase_09 AC 37 ms
53,340 KB
testcase_10 AC 37 ms
53,340 KB
testcase_11 AC 37 ms
53,340 KB
testcase_12 AC 36 ms
53,340 KB
testcase_13 AC 35 ms
53,340 KB
testcase_14 AC 36 ms
53,340 KB
testcase_15 AC 37 ms
53,340 KB
testcase_16 AC 37 ms
53,340 KB
testcase_17 AC 36 ms
53,340 KB
testcase_18 AC 40 ms
59,508 KB
testcase_19 AC 40 ms
59,512 KB
testcase_20 AC 45 ms
62,052 KB
testcase_21 AC 43 ms
59,856 KB
testcase_22 AC 46 ms
62,052 KB
testcase_23 AC 46 ms
62,052 KB
testcase_24 AC 43 ms
59,856 KB
testcase_25 AC 46 ms
62,052 KB
testcase_26 AC 45 ms
62,052 KB
testcase_27 AC 43 ms
59,872 KB
testcase_28 AC 43 ms
59,856 KB
testcase_29 AC 45 ms
62,052 KB
testcase_30 AC 45 ms
62,052 KB
testcase_31 AC 45 ms
62,052 KB
testcase_32 AC 42 ms
59,856 KB
testcase_33 AC 46 ms
62,052 KB
testcase_34 AC 46 ms
62,052 KB
testcase_35 AC 909 ms
219,332 KB
testcase_36 AC 415 ms
138,564 KB
testcase_37 AC 481 ms
149,636 KB
testcase_38 AC 486 ms
148,580 KB
testcase_39 AC 415 ms
137,336 KB
testcase_40 AC 545 ms
159,316 KB
testcase_41 AC 815 ms
206,780 KB
testcase_42 AC 462 ms
145,348 KB
testcase_43 AC 349 ms
126,172 KB
testcase_44 AC 656 ms
178,428 KB
testcase_45 AC 699 ms
186,452 KB
testcase_46 AC 842 ms
212,340 KB
testcase_47 AC 188 ms
98,972 KB
testcase_48 AC 843 ms
212,360 KB
testcase_49 AC 714 ms
189,940 KB
testcase_50 AC 143 ms
91,352 KB
testcase_51 AC 359 ms
128,716 KB
testcase_52 AC 949 ms
226,348 KB
testcase_53 AC 947 ms
226,348 KB
testcase_54 AC 933 ms
224,852 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(j+1):
            dp[i+1][j] += dp[i][k]
            dp[i+1][j] %= mod

print(sum(dp[n])%mod)
0