結果
問題 |
No.3114 0→1
|
ユーザー |
|
提出日時 | 2025-04-19 00:47:08 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 218 bytes |
コンパイル時間 | 487 ms |
コンパイル使用メモリ | 11,904 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2025-04-19 00:47:13 |
合計ジャッジ時間 | 4,052 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | WA * 30 |
ソースコード
n = int(input()) s = input().strip() count = 0 i = 0 while i < len(s) - 1: if s[i] == '0' and s[i+1] == '0': count += 1 i += 2 # skip next to avoid overlapping else: i += 1 print(count)