結果
問題 |
No.2541 Divide 01 String
|
ユーザー |
|
提出日時 | 2023-11-24 21:30:35 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 195 bytes |
コンパイル時間 | 408 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 73,088 KB |
最終ジャッジ日時 | 2024-09-26 08:54:21 |
合計ジャッジ時間 | 2,291 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 WA * 5 |
ソースコード
n = int(input()) s = input().strip('0') n = len(s) ans = 1 now = 0 mod = 998244353 for i in s: if i == '0': now += 1 else: ans = ans * (now + 2) % mod now = 0 print(ans * 499122177 % mod)