結果
| 問題 | No.2541 Divide 01 String |
| コンテスト | |
| ユーザー |
komkompi
|
| 提出日時 | 2023-11-24 22:15:35 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 337 bytes |
| 記録 | |
| コンパイル時間 | 243 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 73,216 KB |
| 最終ジャッジ日時 | 2026-04-13 12:33:56 |
| 合計ジャッジ時間 | 2,238 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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