結果

問題 No.2131 Concon Substrings (COuNt Version)
ユーザー ニックネームニックネーム
提出日時 2022-11-26 01:03:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 239 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 82,276 KB
実行使用メモリ 63,200 KB
最終ジャッジ日時 2024-04-10 05:34:50
合計ジャッジ時間 2,269 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,148 KB
testcase_01 AC 37 ms
51,752 KB
testcase_02 AC 38 ms
52,620 KB
testcase_03 AC 77 ms
62,032 KB
testcase_04 AC 37 ms
53,360 KB
testcase_05 AC 37 ms
53,004 KB
testcase_06 AC 36 ms
51,812 KB
testcase_07 AC 113 ms
61,668 KB
testcase_08 AC 64 ms
61,492 KB
testcase_09 AC 112 ms
62,700 KB
testcase_10 AC 111 ms
61,536 KB
testcase_11 AC 91 ms
62,468 KB
testcase_12 AC 88 ms
62,412 KB
testcase_13 AC 42 ms
59,424 KB
testcase_14 AC 67 ms
62,804 KB
testcase_15 AC 61 ms
62,176 KB
testcase_16 AC 41 ms
59,704 KB
testcase_17 AC 61 ms
61,904 KB
testcase_18 AC 61 ms
63,200 KB
testcase_19 AC 51 ms
61,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input()); mod = 998244353
dp = [1]+[0]*n; ans = 0
for _ in range(n):
    for j in range(n, -1, -1):
        dp[j] = dp[j]*25%mod
        if j: dp[j] = (dp[j]+dp[j-1])%mod
for i, v in enumerate(dp): ans = (ans+i//3*v)%mod
print(ans)
0