結果

問題 No.741 AscNumber(Easy)
ユーザー lloyzlloyz
提出日時 2022-06-21 22:41:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,010 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 82,780 KB
実行使用メモリ 226,280 KB
最終ジャッジ日時 2024-04-23 01:02:35
合計ジャッジ時間 16,154 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,556 KB
testcase_01 AC 34 ms
52,616 KB
testcase_02 AC 33 ms
53,012 KB
testcase_03 AC 32 ms
53,164 KB
testcase_04 AC 33 ms
52,656 KB
testcase_05 AC 32 ms
52,412 KB
testcase_06 AC 33 ms
53,476 KB
testcase_07 AC 36 ms
52,156 KB
testcase_08 AC 37 ms
54,040 KB
testcase_09 AC 34 ms
52,740 KB
testcase_10 AC 34 ms
53,928 KB
testcase_11 AC 33 ms
53,184 KB
testcase_12 AC 37 ms
52,004 KB
testcase_13 AC 34 ms
52,620 KB
testcase_14 AC 33 ms
53,820 KB
testcase_15 AC 34 ms
52,880 KB
testcase_16 AC 34 ms
52,440 KB
testcase_17 AC 34 ms
54,244 KB
testcase_18 AC 34 ms
52,924 KB
testcase_19 AC 36 ms
59,980 KB
testcase_20 AC 46 ms
63,548 KB
testcase_21 AC 43 ms
63,272 KB
testcase_22 AC 45 ms
63,788 KB
testcase_23 AC 43 ms
63,596 KB
testcase_24 AC 41 ms
61,556 KB
testcase_25 AC 42 ms
62,604 KB
testcase_26 AC 44 ms
63,824 KB
testcase_27 AC 42 ms
62,608 KB
testcase_28 AC 40 ms
62,364 KB
testcase_29 AC 43 ms
62,924 KB
testcase_30 AC 43 ms
63,900 KB
testcase_31 AC 44 ms
64,400 KB
testcase_32 AC 40 ms
62,064 KB
testcase_33 AC 44 ms
64,024 KB
testcase_34 AC 44 ms
63,976 KB
testcase_35 AC 978 ms
219,404 KB
testcase_36 AC 459 ms
138,628 KB
testcase_37 AC 523 ms
149,488 KB
testcase_38 AC 507 ms
148,956 KB
testcase_39 AC 440 ms
137,432 KB
testcase_40 AC 592 ms
159,400 KB
testcase_41 AC 875 ms
206,948 KB
testcase_42 AC 496 ms
145,552 KB
testcase_43 AC 374 ms
126,340 KB
testcase_44 AC 716 ms
178,316 KB
testcase_45 AC 750 ms
186,464 KB
testcase_46 AC 906 ms
212,204 KB
testcase_47 AC 203 ms
99,288 KB
testcase_48 AC 948 ms
212,404 KB
testcase_49 AC 793 ms
189,792 KB
testcase_50 AC 150 ms
91,584 KB
testcase_51 AC 396 ms
128,628 KB
testcase_52 AC 1,007 ms
226,280 KB
testcase_53 AC 1,007 ms
226,120 KB
testcase_54 AC 1,010 ms
224,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

mod = 10**9 + 7
DP = [[0 for _ in range(10)] for _ in range(n)]
for i in range(10):
    DP[0][i] = 1
for i in range(n - 1):
    for j in range(10):
        for k in range(j, 10):
            DP[i + 1][k] += DP[i][j]
            DP[i + 1][k] %= mod
ans = 0
for i in range(10):
    ans += DP[-1][i]
    ans %= mod
print(ans)
0