結果

問題 No.741 AscNumber(Easy)
ユーザー lllllll88938494lllllll88938494
提出日時 2022-10-07 21:54:19
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 242 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 87,264 KB
実行使用メモリ 833,488 KB
最終ジャッジ日時 2023-09-03 01:40:45
合計ジャッジ時間 10,342 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,188 KB
testcase_01 AC 76 ms
70,908 KB
testcase_02 AC 75 ms
70,952 KB
testcase_03 AC 74 ms
71,272 KB
testcase_04 AC 74 ms
71,196 KB
testcase_05 AC 78 ms
71,084 KB
testcase_06 AC 76 ms
71,268 KB
testcase_07 AC 72 ms
71,048 KB
testcase_08 AC 74 ms
71,084 KB
testcase_09 AC 72 ms
71,224 KB
testcase_10 AC 73 ms
70,908 KB
testcase_11 AC 73 ms
71,280 KB
testcase_12 AC 76 ms
71,044 KB
testcase_13 AC 75 ms
71,024 KB
testcase_14 AC 75 ms
71,276 KB
testcase_15 AC 75 ms
71,048 KB
testcase_16 AC 74 ms
71,016 KB
testcase_17 AC 74 ms
71,112 KB
testcase_18 AC 75 ms
71,168 KB
testcase_19 AC 75 ms
70,704 KB
testcase_20 AC 87 ms
76,036 KB
testcase_21 AC 80 ms
75,492 KB
testcase_22 AC 90 ms
76,408 KB
testcase_23 AC 85 ms
76,380 KB
testcase_24 AC 77 ms
75,592 KB
testcase_25 AC 84 ms
75,796 KB
testcase_26 AC 84 ms
76,208 KB
testcase_27 AC 82 ms
75,480 KB
testcase_28 AC 79 ms
75,624 KB
testcase_29 AC 79 ms
75,796 KB
testcase_30 AC 84 ms
76,164 KB
testcase_31 AC 82 ms
76,160 KB
testcase_32 AC 75 ms
71,148 KB
testcase_33 AC 81 ms
76,240 KB
testcase_34 AC 88 ms
76,560 KB
testcase_35 TLE -
testcase_36 AC 1,329 ms
392,760 KB
testcase_37 AC 1,311 ms
440,512 KB
testcase_38 AC 1,309 ms
439,668 KB
testcase_39 AC 1,076 ms
380,756 KB
testcase_40 AC 1,470 ms
488,096 KB
testcase_41 TLE -
testcase_42 AC 1,239 ms
430,812 KB
testcase_43 AC 847 ms
332,332 KB
testcase_44 MLE -
testcase_45 TLE -
testcase_46 TLE -
testcase_47 AC 396 ms
193,284 KB
testcase_48 TLE -
testcase_49 TLE -
testcase_50 AC 274 ms
144,436 KB
testcase_51 AC 939 ms
333,436 KB
testcase_52 TLE -
testcase_53 TLE -
testcase_54 MLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
dp=[[0]*10 for i in range(n+2)]
dp[1][0] = 1
mod=10**9+7

for i in range(1,n+2):
    for j in range(1,10):
        dp[i][j] = dp[i-1][j-1] + dp[i-1][j]
        dp[i-1][j] += dp[i-1][j-1]
    dp[i][0] = 1

print(sum(dp[-1])%mod)
0