結果

問題 No.1964 sum = length
ユーザー googol_S0googol_S0
提出日時 2022-06-03 21:24:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 305 bytes
コンパイル時間 1,131 ms
コンパイル使用メモリ 81,412 KB
実行使用メモリ 64,236 KB
最終ジャッジ日時 2023-10-21 01:37:07
合計ジャッジ時間 5,365 ms
ジャッジサーバーID
(参考情報)
judge10 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,460 KB
testcase_01 AC 39 ms
53,460 KB
testcase_02 AC 45 ms
59,552 KB
testcase_03 AC 39 ms
53,460 KB
testcase_04 AC 39 ms
53,460 KB
testcase_05 AC 38 ms
53,460 KB
testcase_06 AC 39 ms
53,460 KB
testcase_07 AC 38 ms
53,460 KB
testcase_08 AC 39 ms
53,460 KB
testcase_09 AC 39 ms
53,460 KB
testcase_10 AC 38 ms
53,460 KB
testcase_11 AC 39 ms
53,460 KB
testcase_12 AC 47 ms
60,112 KB
testcase_13 AC 50 ms
62,188 KB
testcase_14 AC 52 ms
62,188 KB
testcase_15 AC 54 ms
62,188 KB
testcase_16 AC 43 ms
59,568 KB
testcase_17 AC 49 ms
62,188 KB
testcase_18 AC 50 ms
62,188 KB
testcase_19 AC 46 ms
60,112 KB
testcase_20 AC 45 ms
60,112 KB
testcase_21 AC 43 ms
59,568 KB
testcase_22 AC 77 ms
64,236 KB
testcase_23 AC 75 ms
64,236 KB
testcase_24 AC 60 ms
62,188 KB
testcase_25 AC 63 ms
64,236 KB
testcase_26 AC 81 ms
64,236 KB
testcase_27 AC 68 ms
64,236 KB
testcase_28 AC 62 ms
62,188 KB
testcase_29 AC 73 ms
64,236 KB
testcase_30 AC 64 ms
64,236 KB
testcase_31 AC 81 ms
64,236 KB
testcase_32 AC 54 ms
62,188 KB
testcase_33 AC 55 ms
62,188 KB
testcase_34 AC 76 ms
64,236 KB
testcase_35 AC 58 ms
62,188 KB
testcase_36 AC 65 ms
64,236 KB
testcase_37 AC 71 ms
64,236 KB
testcase_38 AC 84 ms
64,236 KB
testcase_39 AC 62 ms
62,188 KB
testcase_40 AC 63 ms
64,236 KB
testcase_41 AC 79 ms
64,236 KB
testcase_42 AC 86 ms
64,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
X=[i-len(str(i)) for i in range(1,N+100)]
DP=[[0]*N for i in range(N+1)]
DP[0][0]=1
mod=998244353
for i in range(N):
  for j in range(N):
    for k in range(len(X)):
      if j+X[k]>=N:
        break
      DP[i+1][j+X[k]]+=DP[i][j]
  for j in range(N):
    DP[i+1][j]%=mod
print(DP[N][N-1])
0