Wrong Answer
Code
#Fahmi_Nafi_46
n = int(input())
x = list(map(int, input().split()))
count = 0
odd = 0
for i in range(n):
if x[i] % 2 == 0:
count += 1
else:
odd += 1
if odd % 2 != 0:
print(-1)
else:
print(count+1)
Information
- Submit By
- Type
- Submission
- Problem
- P1042 Array partition
- Contest
- TLE_Headquarters - round #1
- Language
- Python 3 (Python 3.12.3)
- Submit At
- 2024-03-27 16:49:29
- Judged At
- 2024-11-11 03:38:01
- Judged By
- Score
- 20
- Total Time
- 22ms
- Peak Memory
- 3.121 MiB