結果
| 問題 |
No.3114 0→1
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2025-05-13 11:07:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 235 bytes |
| コンパイル時間 | 669 ms |
| コンパイル使用メモリ | 82,452 KB |
| 実行使用メモリ | 72,028 KB |
| 最終ジャッジ日時 | 2025-05-13 11:07:58 |
| 合計ジャッジ時間 | 3,725 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 WA * 6 |
ソースコード
def main(): n = int(input()) if n==1: print(0) return ans = 0 s = list(input()) for i in range(n-2): if s[i+2]=="0" and not(s[i]==s[i+1]=="1"): s[i+2] = "1" ans += 1 print(ans) if __name__ == "__main__": main()