結果

問題 No.1964 sum = length
ユーザー tonyu0tonyu0
提出日時 2022-09-28 17:57:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 189 ms / 2,000 ms
コード長 370 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 87,008 KB
実行使用メモリ 77,336 KB
最終ジャッジ日時 2023-08-24 04:30:57
合計ジャッジ時間 8,637 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
76,320 KB
testcase_01 AC 83 ms
76,308 KB
testcase_02 AC 105 ms
76,648 KB
testcase_03 AC 82 ms
76,268 KB
testcase_04 AC 96 ms
76,148 KB
testcase_05 AC 96 ms
76,652 KB
testcase_06 AC 97 ms
76,816 KB
testcase_07 AC 98 ms
76,588 KB
testcase_08 AC 100 ms
76,780 KB
testcase_09 AC 99 ms
76,748 KB
testcase_10 AC 100 ms
76,440 KB
testcase_11 AC 102 ms
76,552 KB
testcase_12 AC 115 ms
76,660 KB
testcase_13 AC 127 ms
76,852 KB
testcase_14 AC 137 ms
76,620 KB
testcase_15 AC 143 ms
76,620 KB
testcase_16 AC 108 ms
76,684 KB
testcase_17 AC 123 ms
76,408 KB
testcase_18 AC 124 ms
76,600 KB
testcase_19 AC 114 ms
76,692 KB
testcase_20 AC 116 ms
76,804 KB
testcase_21 AC 106 ms
76,556 KB
testcase_22 AC 185 ms
77,092 KB
testcase_23 AC 183 ms
77,244 KB
testcase_24 AC 157 ms
76,832 KB
testcase_25 AC 164 ms
76,412 KB
testcase_26 AC 186 ms
77,176 KB
testcase_27 AC 170 ms
76,900 KB
testcase_28 AC 162 ms
76,600 KB
testcase_29 AC 180 ms
77,300 KB
testcase_30 AC 165 ms
76,756 KB
testcase_31 AC 187 ms
77,336 KB
testcase_32 AC 149 ms
76,668 KB
testcase_33 AC 145 ms
76,740 KB
testcase_34 AC 183 ms
77,264 KB
testcase_35 AC 151 ms
76,636 KB
testcase_36 AC 166 ms
76,636 KB
testcase_37 AC 178 ms
77,152 KB
testcase_38 AC 189 ms
77,216 KB
testcase_39 AC 165 ms
76,408 KB
testcase_40 AC 164 ms
76,832 KB
testcase_41 AC 183 ms
77,312 KB
testcase_42 AC 189 ms
77,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
M = 205
dp = [0] * M
dp[0] = 1
for i in range(n):
    ndp = [0] * M
    for j in range(M): # 今の和
        for k in range(1,M): # 選ぶ番号
            l = k
            if k<10:l-=1
            elif k<100:l-=2
            else:l-=3
            if j+l<M:
                ndp[j+l]+=dp[j]
                ndp[j+l]%=998244353
    dp=ndp
print(dp[n-1])
0