結果

問題 No.1964 sum = length
ユーザー sotanishysotanishy
提出日時 2022-06-03 21:28:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 517 ms
コンパイル使用メモリ 81,800 KB
実行使用メモリ 66,244 KB
最終ジャッジ日時 2023-10-21 01:37:37
合計ジャッジ時間 3,682 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,372 KB
testcase_01 AC 40 ms
53,372 KB
testcase_02 AC 44 ms
59,392 KB
testcase_03 AC 42 ms
53,372 KB
testcase_04 AC 39 ms
53,372 KB
testcase_05 AC 38 ms
53,372 KB
testcase_06 AC 38 ms
53,372 KB
testcase_07 AC 40 ms
53,372 KB
testcase_08 AC 39 ms
53,372 KB
testcase_09 AC 38 ms
53,372 KB
testcase_10 AC 39 ms
53,372 KB
testcase_11 AC 40 ms
53,372 KB
testcase_12 AC 45 ms
59,844 KB
testcase_13 AC 50 ms
62,064 KB
testcase_14 AC 49 ms
62,052 KB
testcase_15 AC 53 ms
62,052 KB
testcase_16 AC 44 ms
59,392 KB
testcase_17 AC 48 ms
62,052 KB
testcase_18 AC 48 ms
62,052 KB
testcase_19 AC 45 ms
59,844 KB
testcase_20 AC 44 ms
59,844 KB
testcase_21 AC 44 ms
59,392 KB
testcase_22 AC 65 ms
66,244 KB
testcase_23 AC 64 ms
66,156 KB
testcase_24 AC 55 ms
64,100 KB
testcase_25 AC 57 ms
64,108 KB
testcase_26 AC 67 ms
66,244 KB
testcase_27 AC 59 ms
64,108 KB
testcase_28 AC 57 ms
64,108 KB
testcase_29 AC 64 ms
66,244 KB
testcase_30 AC 59 ms
64,184 KB
testcase_31 AC 68 ms
66,244 KB
testcase_32 AC 52 ms
62,052 KB
testcase_33 AC 51 ms
62,052 KB
testcase_34 AC 65 ms
66,244 KB
testcase_35 AC 52 ms
62,052 KB
testcase_36 AC 58 ms
64,108 KB
testcase_37 AC 65 ms
64,108 KB
testcase_38 AC 66 ms
66,156 KB
testcase_39 AC 57 ms
64,108 KB
testcase_40 AC 57 ms
64,108 KB
testcase_41 AC 64 ms
66,156 KB
testcase_42 AC 69 ms
66,244 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

mod = 998244353
n = int(input())
dp = [0] * n
dp[0] = 1
for _ in range(n):
    ndp = [0] * n
    for j in range(1, n+10):
        x = j - len(str(j))
        for k in range(n-x):
            ndp[x+k] = (ndp[x+k] + dp[k]) % mod
    dp = ndp
print(dp[n-1])
0