結果

問題 No.1964 sum = length
ユーザー chineristACchineristAC
提出日時 2022-06-03 23:13:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 376 ms / 2,000 ms
コード長 608 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 81,876 KB
実行使用メモリ 77,036 KB
最終ジャッジ日時 2023-10-21 02:24:24
合計ジャッジ時間 7,825 ms
ジャッジサーバーID
(参考情報)
judge9 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
56,180 KB
testcase_01 AC 48 ms
56,180 KB
testcase_02 AC 56 ms
64,780 KB
testcase_03 AC 50 ms
56,180 KB
testcase_04 AC 49 ms
56,180 KB
testcase_05 AC 48 ms
56,180 KB
testcase_06 AC 48 ms
56,180 KB
testcase_07 AC 57 ms
56,180 KB
testcase_08 AC 47 ms
56,180 KB
testcase_09 AC 48 ms
56,180 KB
testcase_10 AC 47 ms
56,180 KB
testcase_11 AC 50 ms
62,536 KB
testcase_12 AC 63 ms
73,132 KB
testcase_13 AC 75 ms
76,740 KB
testcase_14 AC 91 ms
76,780 KB
testcase_15 AC 100 ms
76,780 KB
testcase_16 AC 55 ms
64,912 KB
testcase_17 AC 68 ms
74,044 KB
testcase_18 AC 74 ms
76,728 KB
testcase_19 AC 63 ms
69,036 KB
testcase_20 AC 64 ms
71,084 KB
testcase_21 AC 54 ms
64,676 KB
testcase_22 AC 304 ms
76,984 KB
testcase_23 AC 287 ms
76,972 KB
testcase_24 AC 156 ms
76,848 KB
testcase_25 AC 186 ms
76,876 KB
testcase_26 AC 333 ms
77,004 KB
testcase_27 AC 241 ms
76,932 KB
testcase_28 AC 171 ms
76,868 KB
testcase_29 AC 283 ms
76,964 KB
testcase_30 AC 184 ms
76,876 KB
testcase_31 AC 331 ms
77,000 KB
testcase_32 AC 117 ms
76,812 KB
testcase_33 AC 114 ms
76,808 KB
testcase_34 AC 284 ms
76,968 KB
testcase_35 AC 138 ms
76,836 KB
testcase_36 AC 223 ms
76,912 KB
testcase_37 AC 272 ms
76,960 KB
testcase_38 AC 361 ms
77,024 KB
testcase_39 AC 178 ms
76,872 KB
testcase_40 AC 186 ms
76,884 KB
testcase_41 AC 311 ms
76,992 KB
testcase_42 AC 376 ms
77,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,random,bisect
from collections import deque,defaultdict
from heapq import heapify,heappop,heappush
from itertools import permutations
from math import log,gcd

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())


mod = 998244353

N = int(input())
dp = [[0 for j in range(N+1)] for i in range(N+1)]
dp[0][0] = 1
for i in range(N):
    for j in range(N):
        for k in range(1,2*N+1):
            p = len(str(k))
            if j+k-p <= N:
                dp[i+1][j+k-p] += dp[i][j]
                dp[i+1][j+k-p] %= mod
print(dp[N][N-1])
0