結果

問題 No.741 AscNumber(Easy)
ユーザー 👑 rin204rin204
提出日時 2022-02-12 22:38:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 431 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 86,884 KB
実行使用メモリ 227,992 KB
最終ジャッジ日時 2023-09-11 11:11:22
合計ジャッジ時間 11,239 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,220 KB
testcase_01 AC 73 ms
71,452 KB
testcase_02 AC 73 ms
71,448 KB
testcase_03 AC 72 ms
71,392 KB
testcase_04 AC 72 ms
71,044 KB
testcase_05 AC 72 ms
71,040 KB
testcase_06 AC 72 ms
71,320 KB
testcase_07 AC 74 ms
71,352 KB
testcase_08 AC 72 ms
71,436 KB
testcase_09 AC 73 ms
71,440 KB
testcase_10 AC 71 ms
71,292 KB
testcase_11 AC 72 ms
71,320 KB
testcase_12 AC 72 ms
71,348 KB
testcase_13 AC 74 ms
71,272 KB
testcase_14 AC 72 ms
71,444 KB
testcase_15 AC 73 ms
71,356 KB
testcase_16 AC 73 ms
71,044 KB
testcase_17 AC 72 ms
71,388 KB
testcase_18 AC 73 ms
71,388 KB
testcase_19 AC 72 ms
71,436 KB
testcase_20 AC 80 ms
76,388 KB
testcase_21 AC 75 ms
76,016 KB
testcase_22 AC 80 ms
76,628 KB
testcase_23 AC 79 ms
76,624 KB
testcase_24 AC 77 ms
76,272 KB
testcase_25 AC 78 ms
76,084 KB
testcase_26 AC 77 ms
76,528 KB
testcase_27 AC 76 ms
76,108 KB
testcase_28 AC 78 ms
75,948 KB
testcase_29 AC 79 ms
76,124 KB
testcase_30 AC 78 ms
76,480 KB
testcase_31 AC 79 ms
76,340 KB
testcase_32 AC 74 ms
71,348 KB
testcase_33 AC 78 ms
76,544 KB
testcase_34 AC 79 ms
76,460 KB
testcase_35 AC 413 ms
220,992 KB
testcase_36 AC 227 ms
139,972 KB
testcase_37 AC 255 ms
151,080 KB
testcase_38 AC 249 ms
150,008 KB
testcase_39 AC 223 ms
138,992 KB
testcase_40 AC 280 ms
160,920 KB
testcase_41 AC 393 ms
208,424 KB
testcase_42 AC 247 ms
146,792 KB
testcase_43 AC 197 ms
126,320 KB
testcase_44 AC 315 ms
180,048 KB
testcase_45 AC 335 ms
188,264 KB
testcase_46 AC 396 ms
213,812 KB
testcase_47 AC 138 ms
100,328 KB
testcase_48 AC 396 ms
214,144 KB
testcase_49 AC 345 ms
191,280 KB
testcase_50 AC 117 ms
89,392 KB
testcase_51 AC 208 ms
130,168 KB
testcase_52 AC 431 ms
227,932 KB
testcase_53 AC 427 ms
227,992 KB
testcase_54 AC 423 ms
226,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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