結果
| 問題 | No.3458 Scores of Subsequence |
| コンテスト | |
| ユーザー |
kidodesu
|
| 提出日時 | 2026-02-28 13:51:06 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 69 ms / 2,000 ms |
| + 319µs | |
| コード長 | 147 bytes |
| 記録 | |
| コンパイル時間 | 233 ms |
| コンパイル使用メモリ | 96,108 KB |
| 実行使用メモリ | 83,456 KB |
| 最終ジャッジ日時 | 2026-07-25 05:28:30 |
| 合計ジャッジ時間 | 3,505 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
now = 1
mod = 998244353
ans = 0
for s in input():
if s == "M":
now = now * 3 % mod
else:
ans = (ans + now) % mod
print(ans)
kidodesu