結果

問題 No.1964 sum = length
ユーザー lilictakalilictaka
提出日時 2022-06-04 01:50:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,963 ms / 2,000 ms
コード長 328 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 81,872 KB
実行使用メモリ 76,352 KB
最終ジャッジ日時 2023-10-21 02:32:51
合計ジャッジ時間 7,427 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,628 KB
testcase_01 AC 40 ms
53,488 KB
testcase_02 AC 53 ms
66,368 KB
testcase_03 AC 37 ms
53,488 KB
testcase_04 AC 37 ms
53,488 KB
testcase_05 AC 39 ms
53,488 KB
testcase_06 AC 38 ms
53,488 KB
testcase_07 AC 38 ms
53,488 KB
testcase_08 AC 39 ms
53,488 KB
testcase_09 AC 49 ms
60,072 KB
testcase_10 AC 43 ms
59,980 KB
testcase_11 AC 45 ms
62,036 KB
testcase_12 AC 75 ms
75,524 KB
testcase_13 AC 110 ms
75,528 KB
testcase_14 AC 192 ms
75,528 KB
testcase_15 AC 257 ms
75,532 KB
testcase_16 AC 49 ms
64,312 KB
testcase_17 AC 82 ms
75,500 KB
testcase_18 AC 93 ms
75,528 KB
testcase_19 AC 70 ms
75,524 KB
testcase_20 AC 71 ms
75,492 KB
testcase_21 AC 49 ms
64,180 KB
testcase_22 AC 1,513 ms
76,220 KB
testcase_23 AC 1,429 ms
76,192 KB
testcase_24 AC 595 ms
75,872 KB
testcase_25 AC 748 ms
76,044 KB
testcase_26 AC 1,696 ms
76,276 KB
testcase_27 AC 1,001 ms
76,048 KB
testcase_28 AC 688 ms
75,924 KB
testcase_29 AC 1,229 ms
76,136 KB
testcase_30 AC 769 ms
75,948 KB
testcase_31 AC 1,697 ms
76,276 KB
testcase_32 AC 330 ms
75,696 KB
testcase_33 AC 305 ms
75,688 KB
testcase_34 AC 1,393 ms
76,188 KB
testcase_35 AC 436 ms
75,788 KB
testcase_36 AC 857 ms
76,088 KB
testcase_37 AC 1,172 ms
76,120 KB
testcase_38 AC 1,847 ms
76,312 KB
testcase_39 AC 732 ms
76,040 KB
testcase_40 AC 787 ms
75,956 KB
testcase_41 AC 1,579 ms
76,236 KB
testcase_42 AC 1,963 ms
76,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
dp = [0] * (2 * n)
dp[0] = 1
mod = 998244353
for i in range(n):
    nx = [0] * (2 * n)
    for s in range(2*n):
        for a in range(1,2*n):
            b = a -(len(list(str(a))) -1)
            if s + b <= 2 * n -1:
                nx[s + b]  += dp[s]
                nx[s+b] %= mod
    dp = nx
print(dp[-1])
0