結果

問題 No.741 AscNumber(Easy)
ユーザー AEnAEn
提出日時 2022-05-19 09:25:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 790 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 433 ms
コンパイル使用メモリ 81,704 KB
実行使用メモリ 75,524 KB
最終ジャッジ日時 2023-10-17 17:32:17
合計ジャッジ時間 13,630 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,472 KB
testcase_01 AC 37 ms
53,472 KB
testcase_02 AC 38 ms
53,472 KB
testcase_03 AC 36 ms
53,472 KB
testcase_04 AC 37 ms
53,472 KB
testcase_05 AC 37 ms
53,472 KB
testcase_06 AC 37 ms
53,472 KB
testcase_07 AC 37 ms
53,472 KB
testcase_08 AC 37 ms
53,472 KB
testcase_09 AC 37 ms
53,472 KB
testcase_10 AC 37 ms
53,472 KB
testcase_11 AC 37 ms
53,472 KB
testcase_12 AC 36 ms
53,472 KB
testcase_13 AC 37 ms
53,472 KB
testcase_14 AC 36 ms
53,472 KB
testcase_15 AC 37 ms
53,472 KB
testcase_16 AC 36 ms
53,472 KB
testcase_17 AC 37 ms
53,472 KB
testcase_18 AC 38 ms
53,472 KB
testcase_19 AC 37 ms
53,472 KB
testcase_20 AC 43 ms
59,968 KB
testcase_21 AC 40 ms
59,628 KB
testcase_22 AC 43 ms
59,968 KB
testcase_23 AC 42 ms
59,968 KB
testcase_24 AC 41 ms
59,628 KB
testcase_25 AC 42 ms
59,628 KB
testcase_26 AC 42 ms
59,968 KB
testcase_27 AC 42 ms
59,628 KB
testcase_28 AC 41 ms
59,628 KB
testcase_29 AC 42 ms
59,628 KB
testcase_30 AC 43 ms
59,968 KB
testcase_31 AC 43 ms
59,968 KB
testcase_32 AC 38 ms
53,472 KB
testcase_33 AC 42 ms
59,968 KB
testcase_34 AC 43 ms
59,968 KB
testcase_35 AC 740 ms
75,520 KB
testcase_36 AC 346 ms
75,492 KB
testcase_37 AC 403 ms
75,496 KB
testcase_38 AC 395 ms
75,496 KB
testcase_39 AC 338 ms
75,496 KB
testcase_40 AC 452 ms
75,492 KB
testcase_41 AC 697 ms
75,520 KB
testcase_42 AC 381 ms
75,492 KB
testcase_43 AC 282 ms
75,484 KB
testcase_44 AC 538 ms
75,508 KB
testcase_45 AC 585 ms
75,508 KB
testcase_46 AC 709 ms
75,520 KB
testcase_47 AC 148 ms
75,480 KB
testcase_48 AC 711 ms
75,524 KB
testcase_49 AC 601 ms
75,512 KB
testcase_50 AC 117 ms
75,476 KB
testcase_51 AC 293 ms
75,488 KB
testcase_52 AC 782 ms
75,524 KB
testcase_53 AC 790 ms
75,524 KB
testcase_54 AC 785 ms
75,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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