結果

問題 No.741 AscNumber(Easy)
ユーザー rlangevinrlangevin
提出日時 2023-02-03 08:52:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 617 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 802 ms
コンパイル使用メモリ 87,044 KB
実行使用メモリ 77,116 KB
最終ジャッジ日時 2023-09-15 09:11:07
合計ジャッジ時間 13,947 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,092 KB
testcase_01 AC 72 ms
71,432 KB
testcase_02 AC 71 ms
71,200 KB
testcase_03 AC 77 ms
71,344 KB
testcase_04 AC 71 ms
71,208 KB
testcase_05 AC 73 ms
71,212 KB
testcase_06 AC 74 ms
71,288 KB
testcase_07 AC 71 ms
71,244 KB
testcase_08 AC 72 ms
71,140 KB
testcase_09 AC 71 ms
71,232 KB
testcase_10 AC 74 ms
71,396 KB
testcase_11 AC 72 ms
71,248 KB
testcase_12 AC 72 ms
71,136 KB
testcase_13 AC 73 ms
71,128 KB
testcase_14 AC 71 ms
71,196 KB
testcase_15 AC 73 ms
71,236 KB
testcase_16 AC 74 ms
71,392 KB
testcase_17 AC 74 ms
71,336 KB
testcase_18 AC 75 ms
75,852 KB
testcase_19 AC 76 ms
75,912 KB
testcase_20 AC 84 ms
76,600 KB
testcase_21 AC 79 ms
76,488 KB
testcase_22 AC 80 ms
76,412 KB
testcase_23 AC 80 ms
76,456 KB
testcase_24 AC 78 ms
76,456 KB
testcase_25 AC 81 ms
76,600 KB
testcase_26 AC 82 ms
76,672 KB
testcase_27 AC 82 ms
76,680 KB
testcase_28 AC 83 ms
76,552 KB
testcase_29 AC 85 ms
76,812 KB
testcase_30 AC 86 ms
76,672 KB
testcase_31 AC 86 ms
76,544 KB
testcase_32 AC 79 ms
76,500 KB
testcase_33 AC 80 ms
76,548 KB
testcase_34 AC 81 ms
76,596 KB
testcase_35 AC 589 ms
76,796 KB
testcase_36 AC 303 ms
76,584 KB
testcase_37 AC 349 ms
76,996 KB
testcase_38 AC 342 ms
77,012 KB
testcase_39 AC 304 ms
76,576 KB
testcase_40 AC 380 ms
77,108 KB
testcase_41 AC 546 ms
77,056 KB
testcase_42 AC 330 ms
77,000 KB
testcase_43 AC 260 ms
76,788 KB
testcase_44 AC 446 ms
77,000 KB
testcase_45 AC 473 ms
77,028 KB
testcase_46 AC 566 ms
76,740 KB
testcase_47 AC 165 ms
77,044 KB
testcase_48 AC 567 ms
76,580 KB
testcase_49 AC 490 ms
76,988 KB
testcase_50 AC 137 ms
76,940 KB
testcase_51 AC 270 ms
77,012 KB
testcase_52 AC 617 ms
76,584 KB
testcase_53 AC 617 ms
77,116 KB
testcase_54 AC 611 ms
77,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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