結果

問題 No.741 AscNumber(Easy)
ユーザー Nikkuniku029Nikkuniku029
提出日時 2022-08-13 16:02:26
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 481 bytes
コンパイル時間 483 ms
コンパイル使用メモリ 81,764 KB
実行使用メモリ 80,408 KB
最終ジャッジ日時 2023-10-25 00:13:24
合計ジャッジ時間 7,245 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,500 KB
testcase_01 AC 37 ms
53,500 KB
testcase_02 AC 37 ms
53,500 KB
testcase_03 AC 37 ms
53,500 KB
testcase_04 AC 36 ms
53,500 KB
testcase_05 AC 37 ms
53,500 KB
testcase_06 AC 37 ms
53,500 KB
testcase_07 AC 38 ms
53,500 KB
testcase_08 AC 37 ms
53,500 KB
testcase_09 AC 38 ms
53,500 KB
testcase_10 AC 38 ms
53,500 KB
testcase_11 AC 39 ms
53,500 KB
testcase_12 AC 38 ms
53,500 KB
testcase_13 AC 39 ms
53,500 KB
testcase_14 AC 39 ms
53,500 KB
testcase_15 AC 39 ms
53,500 KB
testcase_16 AC 39 ms
53,500 KB
testcase_17 AC 44 ms
60,136 KB
testcase_18 AC 44 ms
60,136 KB
testcase_19 AC 44 ms
60,136 KB
testcase_20 AC 63 ms
70,552 KB
testcase_21 AC 56 ms
66,448 KB
testcase_22 AC 65 ms
72,696 KB
testcase_23 AC 64 ms
72,624 KB
testcase_24 AC 53 ms
66,432 KB
testcase_25 AC 59 ms
68,520 KB
testcase_26 AC 63 ms
70,576 KB
testcase_27 AC 56 ms
66,448 KB
testcase_28 AC 57 ms
66,448 KB
testcase_29 AC 59 ms
68,508 KB
testcase_30 AC 63 ms
72,624 KB
testcase_31 AC 62 ms
70,576 KB
testcase_32 AC 52 ms
64,384 KB
testcase_33 AC 63 ms
70,576 KB
testcase_34 AC 66 ms
73,080 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]*12 for _ in range(2)] for _ in range(m+1)]
dp[0][0][0] = 1
for i in range(m):
    for smaller in range(2):
        limit = 10 if smaller else int(n[i])+1
        for j in range(10):
            for x in range(j, limit):
                dp[i+1][smaller | (x < int(n[i]))][x] += dp[i][smaller][j]
                dp[i+1][smaller | (x < int(n[i]))][x] %= MOD
ans = (sum(dp[m][0])+sum(dp[m][1])) % MOD
print(ans)
0