結果
問題 | No.2131 Concon Substrings (COuNt Version) |
ユーザー |
![]() |
提出日時 | 2022-11-25 21:28:00 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 150 ms / 2,000 ms |
コード長 | 237 bytes |
コンパイル時間 | 230 ms |
コンパイル使用メモリ | 82,248 KB |
実行使用メモリ | 76,032 KB |
最終ジャッジ日時 | 2024-10-02 04:00:26 |
合計ジャッジ時間 | 2,511 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
mod=998244353 n=int(input()) dp=[0]*(n+1) dp[0]=1 for i in range(n): ndp=[0]*(n+1) for j in range(n): ndp[j]+=dp[j]*25 ndp[j+1]+=dp[j] dp=[i%mod for i in ndp] ans=0 for i in range(n+1): ans+=dp[i]*(i//3) print(ans%mod)