結果
| 問題 |
No.3114 0→1
|
| コンテスト | |
| ユーザー |
stderr0r
|
| 提出日時 | 2025-04-19 01:17:08 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 255 bytes |
| コンパイル時間 | 348 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 15,428 KB |
| 最終ジャッジ日時 | 2025-04-19 01:17:16 |
| 合計ジャッジ時間 | 4,799 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 30 |
ソースコード
n = int(input())
s = list(map(int, input()))
a = [i % 2 for i in range(n)]
b = [(i % 2) ^ 1 for i in range(n)]
ans1 = 0
ans2 = 0
for i in range(n):
if s[i] == 0 and a[i] == 1: ans1 += 1
if s[i] == 0 and b[i] == 1: ans2 += 1
print(min(ans1, ans2))
stderr0r