結果

問題 No.741 AscNumber(Easy)
ユーザー ああいいああいい
提出日時 2022-01-09 19:20:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,060 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 82,340 KB
実行使用メモリ 226,688 KB
最終ジャッジ日時 2024-04-26 19:52:16
合計ジャッジ時間 16,826 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
51,712 KB
testcase_01 AC 37 ms
51,712 KB
testcase_02 AC 37 ms
51,840 KB
testcase_03 AC 38 ms
51,840 KB
testcase_04 AC 37 ms
51,712 KB
testcase_05 AC 38 ms
51,968 KB
testcase_06 AC 38 ms
51,840 KB
testcase_07 AC 36 ms
51,840 KB
testcase_08 AC 37 ms
51,840 KB
testcase_09 AC 37 ms
51,712 KB
testcase_10 AC 41 ms
51,712 KB
testcase_11 AC 37 ms
51,968 KB
testcase_12 AC 38 ms
51,712 KB
testcase_13 AC 38 ms
51,968 KB
testcase_14 AC 37 ms
51,840 KB
testcase_15 AC 38 ms
51,712 KB
testcase_16 AC 38 ms
51,968 KB
testcase_17 AC 37 ms
52,224 KB
testcase_18 AC 38 ms
52,096 KB
testcase_19 AC 41 ms
57,600 KB
testcase_20 AC 47 ms
61,056 KB
testcase_21 AC 46 ms
60,160 KB
testcase_22 AC 48 ms
61,440 KB
testcase_23 AC 48 ms
61,440 KB
testcase_24 AC 45 ms
60,288 KB
testcase_25 AC 47 ms
61,056 KB
testcase_26 AC 48 ms
61,056 KB
testcase_27 AC 47 ms
60,416 KB
testcase_28 AC 48 ms
60,672 KB
testcase_29 AC 48 ms
61,056 KB
testcase_30 AC 48 ms
61,440 KB
testcase_31 AC 48 ms
60,928 KB
testcase_32 AC 48 ms
60,544 KB
testcase_33 AC 48 ms
61,184 KB
testcase_34 AC 53 ms
61,824 KB
testcase_35 AC 990 ms
219,520 KB
testcase_36 AC 464 ms
139,136 KB
testcase_37 AC 532 ms
149,888 KB
testcase_38 AC 523 ms
148,864 KB
testcase_39 AC 460 ms
137,600 KB
testcase_40 AC 595 ms
159,616 KB
testcase_41 AC 898 ms
206,976 KB
testcase_42 AC 502 ms
145,536 KB
testcase_43 AC 383 ms
126,592 KB
testcase_44 AC 717 ms
178,888 KB
testcase_45 AC 773 ms
186,880 KB
testcase_46 AC 930 ms
212,608 KB
testcase_47 AC 210 ms
99,456 KB
testcase_48 AC 934 ms
212,608 KB
testcase_49 AC 798 ms
190,464 KB
testcase_50 AC 154 ms
91,776 KB
testcase_51 AC 392 ms
129,024 KB
testcase_52 AC 1,060 ms
226,688 KB
testcase_53 AC 1,047 ms
226,560 KB
testcase_54 AC 1,033 ms
225,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
dp = [[0] * 10 for _ in range(N)]
P = 10 ** 9 + 7

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+1][k] + dp[i][j]) % P
print(sum(dp[-1])%P)
0