結果

問題 No.741 AscNumber(Easy)
ユーザー Nikkuniku029Nikkuniku029
提出日時 2022-08-13 16:29:35
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 546 bytes
コンパイル時間 1,224 ms
コンパイル使用メモリ 81,536 KB
実行使用メモリ 80,292 KB
最終ジャッジ日時 2023-10-25 00:38:41
合計ジャッジ時間 6,600 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,392 KB
testcase_01 AC 38 ms
53,392 KB
testcase_02 AC 38 ms
53,392 KB
testcase_03 AC 38 ms
53,392 KB
testcase_04 AC 39 ms
53,392 KB
testcase_05 AC 38 ms
53,392 KB
testcase_06 AC 39 ms
53,392 KB
testcase_07 AC 38 ms
53,392 KB
testcase_08 AC 39 ms
53,392 KB
testcase_09 AC 38 ms
53,392 KB
testcase_10 AC 38 ms
53,392 KB
testcase_11 AC 38 ms
53,392 KB
testcase_12 AC 38 ms
53,392 KB
testcase_13 AC 37 ms
53,392 KB
testcase_14 AC 37 ms
53,392 KB
testcase_15 AC 38 ms
53,392 KB
testcase_16 AC 38 ms
53,392 KB
testcase_17 AC 38 ms
53,392 KB
testcase_18 AC 38 ms
53,392 KB
testcase_19 AC 38 ms
53,392 KB
testcase_20 AC 54 ms
64,204 KB
testcase_21 AC 47 ms
62,080 KB
testcase_22 AC 56 ms
66,384 KB
testcase_23 AC 54 ms
64,204 KB
testcase_24 AC 47 ms
62,080 KB
testcase_25 AC 50 ms
64,172 KB
testcase_26 AC 53 ms
64,204 KB
testcase_27 AC 49 ms
62,124 KB
testcase_28 AC 47 ms
62,080 KB
testcase_29 AC 49 ms
62,124 KB
testcase_30 AC 53 ms
64,204 KB
testcase_31 AC 52 ms
64,204 KB
testcase_32 AC 39 ms
53,392 KB
testcase_33 AC 53 ms
64,204 KB
testcase_34 AC 55 ms
66,384 KB
testcase_35 RE -
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
testcase_39 RE -
testcase_40 RE -
testcase_41 RE -
testcase_42 RE -
testcase_43 RE -
testcase_44 RE -
testcase_45 RE -
testcase_46 RE -
testcase_47 RE -
testcase_48 RE -
testcase_49 RE -
testcase_50 RE -
testcase_51 RE -
testcase_52 RE -
testcase_53 RE -
testcase_54 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = str(pow(10, int(input())))
m = len(n)
MOD = 1000_000_007
dp = [[[0]*11 for _ in range(2)] for _ in range(m+1)]
dp[0][0][0] = 1
for i in range(m):
    for j in range(10):
        dp[i][0][j+1] += dp[i][0][j]
        dp[i][1][j+1] += dp[i][1][j]

    for x in range(10):
        dp[i+1][0][x] += dp[i][0][x]
        dp[i+1][0][x] %= MOD

        dp[i+1][1][x] += dp[i][0][x]
        dp[i+1][1][x] += dp[i][1][x]
        dp[i+1][1][x] %= MOD

ans = dp[m][0][9] % MOD
# print(*dp, sep="\n")
# ans = (sum(dp[m][0])+sum(dp[m][1])) % MOD
print(ans)
0