結果

問題 No.741 AscNumber(Easy)
ユーザー soisusoisu
提出日時 2022-04-07 15:39:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,262 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 429 ms
コンパイル使用メモリ 87,068 KB
実行使用メモリ 227,828 KB
最終ジャッジ日時 2023-08-18 17:51:47
合計ジャッジ時間 22,030 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,280 KB
testcase_01 AC 71 ms
71,464 KB
testcase_02 AC 74 ms
71,356 KB
testcase_03 AC 70 ms
71,560 KB
testcase_04 AC 70 ms
71,476 KB
testcase_05 AC 70 ms
71,304 KB
testcase_06 AC 70 ms
71,324 KB
testcase_07 AC 70 ms
71,116 KB
testcase_08 AC 71 ms
71,300 KB
testcase_09 AC 72 ms
71,300 KB
testcase_10 AC 70 ms
71,324 KB
testcase_11 AC 71 ms
71,376 KB
testcase_12 AC 71 ms
71,232 KB
testcase_13 AC 70 ms
71,216 KB
testcase_14 AC 72 ms
71,272 KB
testcase_15 AC 70 ms
71,548 KB
testcase_16 AC 71 ms
71,280 KB
testcase_17 AC 71 ms
71,276 KB
testcase_18 AC 86 ms
76,220 KB
testcase_19 AC 76 ms
76,252 KB
testcase_20 AC 84 ms
76,588 KB
testcase_21 AC 82 ms
76,632 KB
testcase_22 AC 87 ms
76,684 KB
testcase_23 AC 86 ms
76,492 KB
testcase_24 AC 81 ms
76,324 KB
testcase_25 AC 84 ms
76,428 KB
testcase_26 AC 86 ms
76,612 KB
testcase_27 AC 82 ms
76,588 KB
testcase_28 AC 83 ms
76,320 KB
testcase_29 AC 83 ms
76,336 KB
testcase_30 AC 86 ms
76,680 KB
testcase_31 AC 86 ms
76,604 KB
testcase_32 AC 79 ms
76,436 KB
testcase_33 AC 86 ms
76,660 KB
testcase_34 AC 88 ms
76,600 KB
testcase_35 AC 1,204 ms
220,520 KB
testcase_36 AC 586 ms
139,816 KB
testcase_37 AC 668 ms
151,048 KB
testcase_38 AC 652 ms
149,832 KB
testcase_39 AC 569 ms
138,600 KB
testcase_40 AC 747 ms
160,832 KB
testcase_41 AC 1,099 ms
208,236 KB
testcase_42 AC 632 ms
146,776 KB
testcase_43 AC 485 ms
127,496 KB
testcase_44 AC 874 ms
180,148 KB
testcase_45 AC 953 ms
187,636 KB
testcase_46 AC 1,149 ms
213,548 KB
testcase_47 AC 283 ms
100,792 KB
testcase_48 AC 1,171 ms
213,684 KB
testcase_49 AC 974 ms
191,256 KB
testcase_50 AC 218 ms
92,884 KB
testcase_51 AC 500 ms
130,008 KB
testcase_52 AC 1,243 ms
227,640 KB
testcase_53 AC 1,242 ms
227,828 KB
testcase_54 AC 1,262 ms
226,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for i in range(N):
    for j in range(10):
        for d in range(j,10):
            if 0<d:
                dp[i+1][d]+=dp[i][j]
                dp[i+1][d]%=mod
ans=0
for i in range(N+1):
    ans+=sum(dp[i])
    ans%=mod
print(ans)
0