結果
問題 |
No.3114 0→1
|
ユーザー |
👑 ![]() |
提出日時 | 2025-04-19 09:42:26 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 50 ms / 2,000 ms |
コード長 | 217 bytes |
コンパイル時間 | 913 ms |
コンパイル使用メモリ | 82,040 KB |
実行使用メモリ | 61,568 KB |
最終ジャッジ日時 | 2025-04-19 09:42:59 |
合計ジャッジ時間 | 3,398 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
N = int(input()) S = bytearray(input().encode()) cnt = 0 for i in range(1, N): if S[i] == 49: continue if S[i - 1] == 48 or (i >= 2 and S[i - 2] == 48): S[i] = 49 cnt += 1 print(cnt)