結果

問題 No.741 AscNumber(Easy)
ユーザー Chunky_RBP_ChanChunky_RBP_Chan
提出日時 2022-03-10 12:18:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,078 ms / 2,000 ms
コード長 285 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 87,244 KB
実行使用メモリ 227,704 KB
最終ジャッジ日時 2023-10-12 14:36:59
合計ジャッジ時間 19,498 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,048 KB
testcase_01 AC 75 ms
70,916 KB
testcase_02 AC 70 ms
71,184 KB
testcase_03 AC 72 ms
71,172 KB
testcase_04 AC 71 ms
70,956 KB
testcase_05 AC 74 ms
71,120 KB
testcase_06 AC 72 ms
70,932 KB
testcase_07 AC 72 ms
70,872 KB
testcase_08 AC 73 ms
71,108 KB
testcase_09 AC 73 ms
71,172 KB
testcase_10 AC 71 ms
71,048 KB
testcase_11 AC 73 ms
71,032 KB
testcase_12 AC 71 ms
70,920 KB
testcase_13 AC 71 ms
71,212 KB
testcase_14 AC 72 ms
71,040 KB
testcase_15 AC 72 ms
70,868 KB
testcase_16 AC 74 ms
71,112 KB
testcase_17 AC 73 ms
71,168 KB
testcase_18 AC 76 ms
75,456 KB
testcase_19 AC 77 ms
75,400 KB
testcase_20 AC 81 ms
76,000 KB
testcase_21 AC 80 ms
75,920 KB
testcase_22 AC 82 ms
75,980 KB
testcase_23 AC 83 ms
75,948 KB
testcase_24 AC 79 ms
76,056 KB
testcase_25 AC 82 ms
76,108 KB
testcase_26 AC 82 ms
76,140 KB
testcase_27 AC 80 ms
76,004 KB
testcase_28 AC 79 ms
76,076 KB
testcase_29 AC 80 ms
76,140 KB
testcase_30 AC 80 ms
76,100 KB
testcase_31 AC 80 ms
75,836 KB
testcase_32 AC 80 ms
75,964 KB
testcase_33 AC 81 ms
76,004 KB
testcase_34 AC 82 ms
76,092 KB
testcase_35 AC 1,027 ms
220,596 KB
testcase_36 AC 493 ms
140,008 KB
testcase_37 AC 573 ms
150,840 KB
testcase_38 AC 563 ms
149,856 KB
testcase_39 AC 489 ms
138,684 KB
testcase_40 AC 626 ms
160,360 KB
testcase_41 AC 949 ms
207,928 KB
testcase_42 AC 542 ms
146,924 KB
testcase_43 AC 418 ms
127,360 KB
testcase_44 AC 767 ms
179,848 KB
testcase_45 AC 806 ms
187,916 KB
testcase_46 AC 971 ms
213,540 KB
testcase_47 AC 238 ms
100,124 KB
testcase_48 AC 970 ms
213,708 KB
testcase_49 AC 836 ms
191,132 KB
testcase_50 AC 186 ms
92,660 KB
testcase_51 AC 429 ms
130,072 KB
testcase_52 AC 1,071 ms
227,704 KB
testcase_53 AC 1,078 ms
227,512 KB
testcase_54 AC 1,063 ms
226,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#AscNumber
#https://yukicoder.me/problems/no/741

N = int(input())
MOD = 10**9+7
dp = [[0]*10 for _ in range(N+1)]
dp[0][0]= 1
for i in range(N):
    for j in range(10):
        for k in range(j,10):
            dp[i+1][k] = (dp[i][j]+dp[i+1][k]) % MOD
ans = sum(dp[-1])%MOD
print(ans)
0