結果

問題 No.2943 Sigma String of String Score Problem
ユーザー noriaoki
提出日時 2024-10-18 23:30:16
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 252 bytes
コンパイル時間 370 ms
コンパイル使用メモリ 82,392 KB
実行使用メモリ 76,372 KB
最終ジャッジ日時 2024-10-18 23:30:38
合計ジャッジ時間 11,485 ms
ジャッジサーバーID
(参考情報)
judge1 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

s, t = input().split()
mod = 998244353
dp = [0]*(len(t) + 1)
dp[0] = 1
for i in range(len(s)):
    for j in range(len(t), 0, -1):
        if s[i] == t[j-1]:
            dp[j] += dp[j-1]
            dp[j] %= mod

print(dp[-1]*pow(2, len(s)-len(t), mod))
0