結果

問題 No.1964 sum = length
ユーザー hir355hir355
提出日時 2022-06-03 21:29:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 176 ms / 2,000 ms
コード長 374 bytes
コンパイル時間 192 ms
コンパイル使用メモリ 81,808 KB
実行使用メモリ 63,872 KB
最終ジャッジ日時 2023-10-21 01:38:41
合計ジャッジ時間 5,768 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
59,576 KB
testcase_01 AC 41 ms
59,576 KB
testcase_02 AC 53 ms
61,824 KB
testcase_03 AC 41 ms
59,576 KB
testcase_04 AC 41 ms
59,576 KB
testcase_05 AC 44 ms
61,824 KB
testcase_06 AC 46 ms
61,824 KB
testcase_07 AC 50 ms
61,824 KB
testcase_08 AC 48 ms
61,824 KB
testcase_09 AC 49 ms
61,824 KB
testcase_10 AC 50 ms
61,824 KB
testcase_11 AC 51 ms
61,824 KB
testcase_12 AC 69 ms
61,824 KB
testcase_13 AC 81 ms
61,824 KB
testcase_14 AC 96 ms
61,824 KB
testcase_15 AC 103 ms
61,824 KB
testcase_16 AC 53 ms
61,824 KB
testcase_17 AC 73 ms
61,824 KB
testcase_18 AC 84 ms
61,824 KB
testcase_19 AC 70 ms
61,824 KB
testcase_20 AC 67 ms
61,824 KB
testcase_21 AC 54 ms
61,824 KB
testcase_22 AC 155 ms
63,872 KB
testcase_23 AC 152 ms
63,872 KB
testcase_24 AC 126 ms
63,872 KB
testcase_25 AC 131 ms
63,872 KB
testcase_26 AC 162 ms
63,872 KB
testcase_27 AC 149 ms
63,872 KB
testcase_28 AC 138 ms
63,872 KB
testcase_29 AC 152 ms
63,872 KB
testcase_30 AC 140 ms
63,872 KB
testcase_31 AC 165 ms
63,872 KB
testcase_32 AC 108 ms
61,824 KB
testcase_33 AC 112 ms
61,824 KB
testcase_34 AC 164 ms
63,872 KB
testcase_35 AC 117 ms
61,824 KB
testcase_36 AC 139 ms
63,872 KB
testcase_37 AC 148 ms
63,872 KB
testcase_38 AC 167 ms
63,872 KB
testcase_39 AC 133 ms
63,872 KB
testcase_40 AC 138 ms
63,872 KB
testcase_41 AC 163 ms
63,872 KB
testcase_42 AC 176 ms
63,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353
n = int(input())
dp = [[0] * 410 for _ in range(n + 1)]
dp[0][205] = 1
x = [0] * 210
for i in range(1, 211):
    x[i - 1] = i - len(str(i)) - 1
for i in range(n):
    for j in range(410):
        dp[i][j] %= MOD
    for j in range(410):
        for y in x:
            if 0 <= j + y < 410:
                dp[i + 1][j + y] += dp[i][j]
print(dp[n][204] % MOD)
0