problem_id stringclasses 100
values | submission_id stringlengths 10 10 | status stringclasses 2
values | code stringlengths 6 806 |
|---|---|---|---|
p02607 | s147500024 | Accepted | n = int(input())
*a, = map(int, input().split())
print(sum(i%2 for i in a[::2])) |
p02607 | s505846699 | Accepted | n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(0, n, 2):
if a[i] % 2 == 1:
ans += 1
print(ans) |
p02607 | s288449143 | Accepted | N = int(input())
A = [int(_) for _ in input().split()]
ans = 0
for i, a in enumerate(A):
if i % 2 == 0 and a % 2 == 1:
ans += 1
print(ans)
|
p02607 | s861242625 | Accepted | N = int(input())
A = [int(x) for x in input().split()]
C = 0
for i in range(0,N,2):
if A[i] % 2 == 1:
C += 1
print(C) |
p02607 | s416763991 | Accepted | n = int(input())
count = 0
for idx, a_i in enumerate(list(map(int, input().split()))):
if (idx + 1) % 2 != 0 and a_i % 2 != 0:
count += 1
print(count) |
p02607 | s595603183 | Accepted | N = int(input())
a = [0] + list(map(int, input().split()))
cnt = 0
for i in range(1, N+1):
ai = a[i]
if i%2 == 1 and ai%2 == 1:
cnt += 1
print(cnt) |
p02607 | s792037911 | Accepted | mass = int(input())
nums = list(map(int, input().split()))
c = 0
for i in range(len(nums)):
if nums[i]%2 ==1:
i += 1
if i%2 == 1:
c += 1
print(c) |
p02607 | s312616567 | Accepted |
N = int(input())
a = list(map(int,input().split()))
cnt=0
for i in range(N):
if (i+1)%2==1 and a[i]%2==1:
cnt+=1
print(cnt)
|
p02607 | s941896684 | Accepted | n=int(input())
a=input().split()
cnt=0
for i in range(0,n,2):
if(int(a[i])%2!=0):
cnt=cnt+1
print(cnt)
|
p02607 | s055604447 | Accepted | def main():
N = int(input())
A = list(map(int, input().split()))
cnt = 0
for i in range(N):
if i%2==0 and A[i]%2==1:
cnt += 1
print(cnt)
if __name__ == '__main__':
main()
|
p02607 | s631360685 | Accepted | n = int(input())
a = list(input().split())
a = [int(a[i]) for i in range(n)]
ans = 0
for j in range(n):
if j%2 == 0 and a[j]%2 == 1:
ans = ans + 1
print(ans) |
p02607 | s406335836 | Accepted | inpl = lambda: list(map(int,input().split()))
N = int(input())
A = inpl()
print(sum(A[i]%2 for i in range(0,N,2)))
|
p02607 | s308729170 | Accepted | n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in a[::2]:
if i % 2 == 1:
ans += 1
print(ans)
|
p02607 | s143709162 | Accepted | n = int(input())
A = list(map(int, input().split()))
ans = 0
for i in range(n):
if A[i] % 2 == 1 and (i + 1) % 2 == 1:
ans += 1
print(ans) |
p02607 | s756247217 | Accepted | n = int(input())
a = [int(i) for i in input().split()]
cnt = 0
for i in range(n):
if a[i]%2==1 and (i+1)%2==1:
cnt +=1
print(cnt) |
p02607 | s043487330 | Accepted | n = int(input())
a = [int(i) for i in input().split()]
c = 0
for i in range(0,n,2):
if a[i] % 2 == 1:
c += 1
print(c) |
p02607 | s321434307 | Accepted | N=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(0,N,2):
if a[i]%2==1:
ans+=1
print(ans) |
p02607 | s451503619 | Accepted | import sys
readline = sys.stdin.buffer.readline
read = sys.stdin.buffer.read
N = int(readline())
A = list(map(int, read().rstrip().split()))
A = A[::2]
B = [a for a in A if a % 2 == 1]
print(len(B)) |
p02607 | s667694499 | Accepted |
import collections
from functools import lru_cache
def read():
return input().strip()
def readInt():
return int(input().strip())
def readList():
return list(map(int, input().strip().split()))
def solve(n, arr):
ans = 0
for i, val in enumerate(arr, 1):
if i & 1 and val & 1:
ans += 1
return ans
n = readInt()
arr = readList()
print(solve(n, arr))
|
p02607 | s384166717 | Accepted | n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
if ((i+1) * a[i]) % 2 != 0:
ans += 1
print(ans) |
p02607 | s687876412 | Accepted | N = int(input())
nums = list(map(int, input().split()))
cnt = 0
for i in range(N):
num = i + 1
if (num % 2 == 1 and nums[i] % 2 == 1):
cnt += 1
print(cnt)
|
p02607 | s120766127 | Accepted | n=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(0,len(a),2):
if a[i]%2==1:
ans+=1
print(ans)
|
p02607 | s161544381 | Accepted | n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(0, n, 2):
if a[i]%2 == 1:
ans += 1
print(ans) |
p02607 | s806425512 | Accepted | N = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(0, N, 2):
if a[i] % 2 == 1:
count += 1
print(str(count))
|
p02607 | s617133923 | Accepted | N = int(input())
A = [int(s) for s in input().split()]
count = 0
for i in range(0, N, 2):
if A[i] % 2 == 1:
count += 1
print(count) |
p02607 | s662462629 | Accepted | N = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(N):
if (i + 1) % 2 == 1 and a[i] % 2 == 1:
ans += 1
print(ans) |
p02607 | s096805188 | Accepted | from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))
N = int(input())
Als = inpl()
count= 0
for i,item in enumerate(Als):
if (i%2 == 0) and (item % 2 != 0):
count += 1
print(count)
|
p02607 | s135907766 | Accepted | # 幅優先探索(行きがけ)
import collections
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
N = I()
Aarray = LI()
cnt = 0
for i in range(N):
if i % 2 == 0 and Aarray[i] % 2 != 0:
cnt += 1
print(cnt)
if __name__ == '__main__':
main()
|
p02607 | s047038786 | Accepted | N=int(input())
a=[int(x) for x in input().split()]
cnt=0
for i in range(N):
if i%2==0 and a[i]%2==1:
cnt+=1
print(cnt)
|
p02607 | s736150714 | Accepted | import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
a = LI()
ans = 0
for i, A in enumerate(a):
if (i+1) % 2 == 1:
if A % 2 == 1:
ans += 1
print(ans) |
p02607 | s578069044 | Accepted | N = int(input())
arr = list(map(int, input().split()))
count = sum([ 1 for x in arr[::2] if x % 2 == 1])
print(count) |
p02607 | s255804482 | Accepted | #import numpy as np
#import functools
#import operator
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as comb_with
#from itertools import permutations as perm
#import collections as C #most_common
#import math
#import sympy
N = int(input())
#N,K,d= map(int,input().split())
A = list(map(int,input().split()))
#S = str(input())
#T = str(input())
c=0
for i in range(1,N+1):
if i%2!=0 and A[i-1]%2!=0:
c+=1
print(c)
|
p02607 | s024235379 | Accepted | N = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(0,N,2):
if a[i]%2==1:
ans+=1
print(ans) |
p02607 | s291800921 | Accepted | N = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(N):
if (i+1) % 2 == 1 and a[i] % 2 == 1:
cnt += 1
print(cnt) |
p02607 | s903908276 | Accepted | N = int(input())
A = list(map(int,input().split()))
cnt = 0
if len(A)%2==0:
q = N//2
else:
q = N//2 + 1
for i in range(q):
if A[2*i]%2!=0:
cnt += 1
print(cnt) |
p02607 | s224681352 | Accepted | n=int(input())
a=list(map(int,input().split()))
b=0
for i in range(n):
if i%2==0 and a[i]%2==1:
b+=1
print(b) |
p02607 | s615348094 | Accepted | import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
A = A.reshape((int(N/2), 2))[:,0] if N % 2 == 0 else np.append(A, 2, 100).reshape((int((N+1)/2), 2))[:, 0]
print((A % 2 == 1).sum()) |
p02607 | s584529806 | Accepted | #!/usr/bin/env python
import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**6)
INF = float("inf")
def main():
N = int(input())
A = list(map(int,input().split()))
ans = 0
for i in range(N):
if i%2 == 0 and A[i]%2 == 1:
ans += 1
print(ans)
if __name__ == "__main__":
main() |
p02607 | s369910318 | Accepted | import math
import collections
import fractions
import itertools
import functools
import operator
def solve():
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
if (i+1) % 2 == 1 and a[i] % 2 == 1:
ans += 1
print(ans)
return 0
if __name__ == "__main__":
solve()
|
p02607 | s872926202 | Accepted | n=input()
print(len([a for a in list(map(int,input().split()))[::2] if a%2])) |
p02607 | s853161291 | Accepted | import sys
from io import StringIO
import unittest
import numpy as np
def resolve():
li = sys.stdin.readlines()
N = int(li[0].strip())
a = list(map(int, li[1].strip().split(' ')))
A = np.array(a[0::2])
A = (A % 2 == 1)
print(A.sum())
resolve() |
p02607 | s065322308 | Accepted | n = int(input())
aas = list(map(int, input().split()))
res = 0
for i in range(n):
if (i+1)%2!=0 and aas[i]%2!=0:
res += 1
print(res) |
p02607 | s569354237 | Accepted | a = int(input())
s = 0
b = input().split(" ")
i = 1
while i <= a :
if (i % 2 == 1) and (int(b[i-1]) % 2 == 1) :
s = s + 1
i = i + 1
print(s)
|
p02607 | s978630018 | Accepted | n = int(input())
a = list(map(int, input().split()))
c = 0
for i in range(0, n, 2):
if a[i] % 2 != 0:
c += 1
print(c)
|
p02607 | s344431598 | Accepted | n = int(input())
a = list(map(int, input().split()))
c = 0
for i in range(n):
if (i+1) % 2 != 0 and a[i]%2 != 0:
c += 1
print(c) |
p02607 | s357810688 | Accepted | n=int(input())
a_list=[int(i) for i in input().split()]
count=0
for i in range(n):
if (i+1)%2!=0 and a_list[i]%2!=0:
count+=1
print(count) |
p02607 | s568764390 | Accepted | n=int(input())
c=list(map(int, input().split()))
c = [0] + c
ans = 0
for i in range(1,n+1):
if i%2 == 1 and c[i]%2 ==1:
ans += 1
print(ans)
|
p02607 | s022267913 | Accepted | #!/usr/bin/env python3
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
if (i + 1) % 2 == 1 and a[i] % 2 == 1:
ans += 1
print(ans)
|
p02607 | s710585692 | Accepted | N = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(0, N, 2):
if a[i] % 2 == 1:
ans += 1
else:
pass
print(ans) |
p02607 | s182641550 | Accepted | n=int(input())
a_list = list(map(int,input().split()))
count = 0
for i in range(1, n+1):
if i % 2 == 1 and a_list[i-1] % 2 == 1:
count += 1
print(count) |
p02607 | s869078882 | Accepted | N = int(input())
a=list(map(int,input().split()))
c = 0
for i in range(N):
if i%2==0:
if a[i]%2==1:
c = c+1
print(c) |
p02607 | s608723674 | Accepted | n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
if(i+1)%2==1 & a[i]%2==1:
ans +=1
print(ans)
|
p02607 | s880963060 | Accepted | n = int(input())
L = list(map(int,input().split()))
cnt = 0
for i in range(n):
if (i+1)%2 == 1 and L[i]%2 == 1:
cnt +=1
print(cnt) |
p02607 | s648072627 | Accepted | N = int(input())
A = list(map(int, input().split()))
cnt=0
for i in range(1,N+1):
if A[i-1]%2==1 and i%2==1:
cnt+=1
print(cnt) |
p02607 | s655542991 | Accepted | n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
if (i+1)%2 == 1 and a[i]%2 ==1:
ans += 1
print(ans) |
p02607 | s180116605 | Accepted | n=int(input())
count=0
a = input().split(" ")
lista = [int(n) for n in a]
for i in range(0,n,2):
if lista[i]%2==1:
count+=1
print(count)
|
p02607 | s890979818 | Accepted | n = int(input())
a = list(map(int,input().split()))
cnt = 0
for i in range(0,len(a),2):
if a[i]%2==1:
cnt += 1
print(cnt) |
p02607 | s310687902 | Accepted | n = int(input())
list = [int(i) for i in input().split()]
ans = 0
for i in range(n):
if i%2==0 and list[i]%2==1:
ans += 1
print(ans)
|
p02607 | s299378761 | Accepted | n=int(input())
a_list= list(map(int, input().split()))
count=0
for i in range(n) :
if i%2==0 and a_list[i]%2==1 :
count+=1
print(count) |
p02607 | s257724121 | Accepted | #B
N=int(input())
A=list(map(int,input().split()))
ans=0
for i in range(N):
if (i+1)%2==1 and A[i]%2==1:
ans+=1
print(ans) |
p02607 | s028254840 | Accepted | print(sum(map(lambda x:int(x)%2,open(0).read().split()[1::2]))) |
p02607 | s790810849 | Accepted | N = int(input())
a_list = list(map(int, input().split()))
count = 0
for i in range(1,N+1):
if a_list[i-1] % 2 == 1 and i % 2 == 1:
count += 1
print(count) |
p02607 | s285009842 | Accepted | n=int(input())
l=[int(i) for i in input().split()]
c=0
for i in range(n):
if (i+1)%2==1 and l[i]%2==1:
c+=1
print(c)
|
p02607 | s191391426 | Accepted | N = int(input())
a_list = list(map(int, input().split()))
count = 0
for i in range(N):
if i%2==0 and a_list[i]%2==1:
count = count + 1
print(count) |
p02607 | s684583665 | Accepted | import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7
def main():
N = int(readline())
A = list(map(int, readline().split()))
ans = 0
for i in range(0,N,2):
if A[i]%2==1:
ans += 1
print(ans)
if __name__ == '__main__':
main()
|
p02607 | s167383948 | Accepted |
ans=0
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
if (i+1) % 2 == 0:
continue
if a[i]%2!=0:
ans+=1
print(ans) |
p02607 | s713698243 | Accepted | N = int(input())
a_list = [int(a) for a in input().split()]
count = 0
for n in range(N):
if (n + 1) % 2 == 1 and a_list[n] % 2 == 1:
count += 1
print(count)
|
p02607 | s542455047 | Accepted | N = int(input())
A = list(map(int, input().split()))
print(len([a for a in A[::2] if a%2==1])) |
p02607 | s463640816 | Accepted | def main():
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
if i%2 == 0 and a[i]%2 == 1:
ans += 1
print(ans)
if __name__ == "__main__":
main() |
p02607 | s393874989 | Accepted | #
import sys
input=sys.stdin.readline
def main():
N=int(input())
A=list(map(int,input().split()))
cnt=0
for i in range(N):
if A[i]%2==1 and i%2==0:
cnt+=1
print(cnt)
if __name__=="__main__":
main() |
p02607 | s938117623 | Accepted | N = int(input())
a_list = list(map(int, input().split()))
count = 0
for i in range(0, N, 2):
if(a_list[i] % 2 == 1):
count += 1
print(count) |
p02607 | s493251797 | Accepted | n = int(input())
A = list(map(int,input().split()))
ans = 0
for i in range(n):
if (i+1) % 2 == 1 and A[i] % 2 == 1:
ans += 1
print(ans) |
p02607 | s088008817 | Accepted | n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
if (i + 1) % 2 == 1:
if a[i] % 2 == 1:
ans += 1
print(ans)
|
p02607 | s755416012 | Accepted | N=int(input())
*A,=map(int,input().split())
ans=0
i=0
while i<N:
if i%2==0 and A[i]%2==1:
ans+=1
i+=1
print(ans) |
p02607 | s207461290 | Accepted | import sys
sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]
n=II()
aa=LI()
ans=0
for i,a in enumerate(aa,1):
if i&1 and a&1:ans+=1
print(ans) |
p02607 | s378556621 | Accepted | n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
if i % 2 == 0 and a[i] % 2 != 0:
ans += 1
print(ans) |
p02607 | s379701138 | Accepted | n = int(input())
a = list(map(int, input().split()))
c = 0
for x in range(1, n+1):
if x & 1 and a[x-1] & 1:
c += 1
print(c) |
p02607 | s848262667 | Accepted | N = int(input())
a_list = list(map(int, input().split()))
cnt = 0
for i, a in enumerate(a_list, 1):
if i%2==1 and a%2==1:
cnt += 1
print(cnt) |
p02607 | s170009123 | Accepted | import sys
N = int(input())
A = list(map(int, sys.stdin.readline().rsplit()))
res = 0
for i, a in enumerate(A):
if (i + 1) % 2 == 1 and a % 2 == 1:
res += 1
print(res)
|
p02607 | s858290435 | Accepted | n = int(input())
line = [int(x) for x in input().split()]
count = 0
for i in range(0, n, 2):
if line[i] % 2 != 0:
count += 1
print(count)
|
p02607 | s846788023 | Accepted | N = int(input())
A = list(map(int, input().split()))
ans = 0
for i in range(0, N, 2):
if A[i] % 2 == 1:
ans += 1
print(ans)
|
p02607 | s982855341 | Accepted | n=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(n):
if i%2 == 0 and a[i]%2 != 0:
ans+=1
print(ans) |
p02607 | s529712688 | Accepted | n = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(1, n+1):
cnt += (i%2==1) and (a[i-1]%2==1)
print(cnt) |
p02607 | s878680968 | Accepted | n=int(input())
a=list(map(int,input().split()))
count=0
for i in range(n):
if (i+1)%2!=0:
if a[i]%2!=0:
count+=1
print(count) |
p02607 | s265091043 | Accepted | N = int(input())
L = list(map(int, input().split()))
ans = 0
for i, l in enumerate(L):
if i % 2 != 1 and l % 2 == 1:
ans += 1
print(ans)
|
p02607 | s870565264 | Accepted | N = int(input())
a = list(map(int,input().split()))
if(N%2 == 0):
N = int(N/2)
else:
N = int(N/2)+1
count = 0
for i in range(1,N+1):
if(a[(2*i-1)-1]%2 == 1):
count += 1
print(count) |
p02607 | s081306017 | Accepted | n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
if i%2==0 and a[i]%2==1:
ans+= 1
print(ans) |
p02607 | s911504134 | Accepted | n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
if i % 2 == 0 and a[i] % 2 == 1:
ans += 1
print(ans)
|
p02607 | s289727231 | Accepted | a = int(input())
b = list(map(int, input().split()))
count = 0
for i in range(a):
if (i + 1) % 2 != 0:
if b[i] % 2 != 0:
count += 1
print(count) |
p02607 | s303388198 | Accepted | n = int(input())
s = list(map(int,input().split()))
a = 0
for i in range(n):
if i%2 == 0 and s[i]%2 ==1:
a+=1
print(a) |
p02607 | s045769423 | Accepted | for i in range(1):
n=int(input())
l=list(map(int,input().split()))
c=0
for i in range(n):
if((i+1)%2!=0 and l[i]%2!=0):
c=c+1
print(c) |
p02607 | s821600868 | Accepted | def main():
N = int(input())
a = list(map(int,input().split()))
res = 0
for i in range(N):
if (i+1) % 2 == 1 and a[i] % 2 == 1:
res += 1
print(res)
if __name__ == "__main__":
main()
|
p02607 | s620336635 | Accepted | n = int(input())
arr = list(map(int, input().split()))
acc = 0
for i in range(n):
if i % 2 == 0 and arr[i] % 2 == 1:
acc += 1
print(acc) |
p02607 | s665193242 | Accepted | N=int(input())
A=list(map(int,input().split()))
ans=0
for i in range(N):
if i%2==0 and A[i]%2!=0:
ans+=1
print(ans)
|
p02607 | s329953443 | Accepted | n=int(input())
L=[int(i) for i in input().split()]
count=0
for i in range(1,n+1,2):
if(L[i-1]%2!=0):
count+=1
print(count) |
p02607 | s347809366 | Accepted | n = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(n):
if i % 2 == 1:
continue
elif a[i] % 2 != 0:
count += 1
print(count) |
p02607 | s372901917 | Accepted | n=int(input())
s=list(map(int,input().split()))
count=0
for i in range(0,len(s)):
index_1=i+1
if(int(s[i])%2 != 0):
if(int((index_1))% 2 != 0 ):
count+=1
else:
count+=0
else:
count+=0
print(count)
|
p02607 | s939173048 | Accepted | input()
print(sum([int(i)%2 for i in input().split()[::2]]))
|
p02607 | s595875191 | Accepted | import sys
import math
import itertools
import random
n=int(input())
a=list(map(int, input().split()))
cnt=0
for i in range(n):
if(i%2==0 and a[i]%2==1):
cnt+=1
print(cnt) |
p02607 | s151428296 | Accepted | N = int(input())
A = list(map(int,input().split()))
count = 0
if N % 2 ==0:
for i in range((N+2)//2 - 1):
if A[2*i ] % 2 == 1:
count += 1
else:
for i in range((N+2)//2):
if A[2*i ] % 2 == 1:
count += 1
print(count) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.