結果
| 問題 | No.2541 Divide 01 String |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2023-11-25 00:21:11 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 288 bytes |
| 記録 | |
| コンパイル時間 | 883 ms |
| コンパイル使用メモリ | 82,332 KB |
| 実行使用メモリ | 85,808 KB |
| 最終ジャッジ日時 | 2024-09-26 09:50:26 |
| 合計ジャッジ時間 | 3,749 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 3 RE * 7 |
ソースコード
N = int(input())
S = input()
ans = 0
f = 0
for s in list(S):
if f == 0:
if s == "1":
f = 1
cnt = 1
ans = 1
elif f == 1:
if s == "0":
cnt += 1
else:
ans *= (cnt + 1)
cnt = 1
print(ans)
ntuda