結果
| 問題 |
No.2541 Divide 01 String
|
| コンテスト | |
| ユーザー |
komkompi
|
| 提出日時 | 2023-11-24 22:15:35 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 337 bytes |
| コンパイル時間 | 225 ms |
| コンパイル使用メモリ | 82,124 KB |
| 実行使用メモリ | 73,088 KB |
| 最終ジャッジ日時 | 2024-09-26 09:27:13 |
| 合計ジャッジ時間 | 2,137 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 5 |
ソースコード
# coding: utf-8
# Your code here!
N=int(input())
S=input()
MOD=998244353
ans=1
count=-1
for s in S:
if s=="1":
if count==-1:
count=0
else:
ans*=(count+2)
ans%=MOD
count=0
else:
if count==-1:
pass
else:
count+=1
print(ans)
komkompi