Problem:


Score : 200 points

Problem Statement

We have N squares assigned the numbers 1,2,3,\ldots,N. Each square has an integer written on it, and the integer written on Square i is a_i.

How many squares i satisfy both of the following conditions?

The assigned number, i, is odd.

The written integer is odd.

Constraints

All values in input are integers.

1 \leq N, a_i \leq 100

Input

Input is given from Standard Input in the following format:

N
a_1 a_2 \cdots a_N

Output

Print the number of squares that satisfy both of the conditions.

Sample Input 1

5
1 3 4 5 7

Sample Output 1

2

Two squares, Square 1 and 5, satisfy both of the conditions.

For Square 2 and 4, the assigned numbers are not odd.

For Square 3, the written integer is not odd.

Sample Input 2

15
13 76 46 15 50 98 93 77 31 43 84 90 6 24 14

Sample Output 2

3



Sample input:
5
1 3 4 5 7


Sample output:
2

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
N = int(input())
As = list(map(int, input().split()))

ans = 0
for i in range(0, N, 2):
  if As[i] % 2 == 1:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int,input().split( )))
ans = 0
for i,ai in enumerate(a):
    if (i+1)%2 == 1 and ai%2 == 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))

sm=0
for i in range(0,n,2):
    if a[i]%2==1:
        sm+=1

print(sm)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split(" ")]
count = 0
for i in range(N):
    if (i + 1) % 2 == 1 and A[i] % 2 == 1:
        count += 1
print(count)

Submission status: Accepted

Solution code:
a=int(input())
b=list(map(int,input().split()))
ans=0
for i in  range(0,a,2):
  if b[i]%2==1:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]

ans = 0
for i in range(N):
    if i%2==0 and A[i]%2==1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
#Problem B
N = int(input())
a = list(map(int,input().split()))

cnt = 0

for i in range(N):
    if (i+1)%2 != 0 and a[i] %2 != 0:
        cnt += 1
        
print(cnt)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    n = int(input())
    a = [int(i) for i in input().split()]
    count =0

    for i in range(n):
        if i %2 ==0 and a[i] %2 ==1:
            count+=1
    print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(1, n+1, 1):
    if i % 2 == 1:
        if a[i-1] % 2 == 1:
            cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
#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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(1,n+1):
    if i%2 == 1 and a[i-1]%2 == 1:
        count += 1
print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    n = input_int()
    a_list = input_to_int_tuple()

    cnt = 0
    for index, value in enumerate(a_list):
        if (index + 1) % 2 == 1 and value % 2 == 1:
            cnt += 1

    return cnt

if __name__ == "__main__":
    print(main())

Submission status: Accepted

Solution code:
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# import numpy as np
# sys.setrecursionlimit(int(pow(10,6)))
# sys.stdout = open("out.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]

try:
    sys.stdin = open("input.txt", "r")
except:
    pass


# @lru_cache(None)
n=L()[0]
A=L()
print(sum(1 if i%2==0 and A[i]%2==1 else 0 for i in range(n)))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, a: "List[int]"):
    count = 0
    for i, ai in enumerate(a):
        if (i+1) % 2 == 1 and ai % 2 == 1:
            count += 1
    print(count)


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    a = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, a)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
import bisect
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)

Submission status: Accepted

Solution code:
import sys
import math
import heapq
from collections import defaultdict, deque
from decimal import *
def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

n=r()
a=rl()
cnt=0
for i in range(0,n,2):
    if a[i]%2==1:
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))

cnt = 0
for i, a in enumerate(A, start=1):
    if i % 2 == 1 and a % 2 == 1:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(sys.stdin.readline())
def ria(): return list(map(int, sys.stdin.readline().split()))
def ws(s): sys.stdout.write(s); sys.stdout.write('\n')
def wi(n): sys.stdout.write(str(n)); sys.stdout.write('\n')
def wia(a, sep=' '): sys.stdout.write(sep.join([str(x) for x in a])); sys.stdout.write('\n')


def solve(n, k):
    return 0


def main():
    n = ri()
    a = ria()
    cnt = 0
    for i in range(n):
        if i % 2 == 0 and a[i] % 2 == 1:
            cnt += 1
    wi(cnt)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
N = int(input())
As = list(map(int, input().split()))

print(sum([a % 2 == 1 for a in As[::2]]))

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
b =0
for i in range(0,N,2):
  if(a[i]%2==1):
    b+=1
print(b)

Submission status: Accepted

Solution code:
# Template 1.0
import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()

a = LIST()
ans = 0
for i in range(n):
    if((i+1)%2!=0 and a[i]%2!=0):
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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)

Submission status: Accepted

Solution code:
import sys 
input = lambda:sys.stdin.readline().strip()
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(1,n+1):
    if i&1==1 and a[i-1]&1==1:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(1,n+1,2):
    if a[i-1]%2 == 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

res = 0
for i, a in enumerate(A):
    idx = i+1
    if idx % 2 == 1 and a % 2 == 1:
        res += 1

print(res)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int,input().split()))
ans = 0
for i,a in enumerate(A):
    if i%2 == 0 and a%2 == 1:
        ans +=1
print(ans)

Submission status: Accepted

Solution code:
# B

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)

Submission status: Accepted

Solution code:
n = int(input())
list_A = list(map(int, input().split()))
ans = 0

for i in range(n):
    if (i + 1) % 2 == 1 and list_A[i] % 2 == 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = 0
for x in range(n):
    if (x+1) % 2 != 0 and a[x] % 2 != 0:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
a = [int(i) for i in input().split(" ")]
count = 0
for i in range(N):
  if (i+1)%2==1 and a[i]%2==1:
    count+=1
print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split())) 

ans = 0

for i in range(n):
    if i % 2 == 0:
        if a[i] % 2 != 0:
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int,input().split()))
k = 0
for i in range(N):
  if i%2 ==0 and a[i]%2==1:
    k += 1
print(k)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
cnt = 0
for i in range(n):
    if i%2 == 0:
        if a[i]%2 == 1:
            cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline



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)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
count = 0
for i,aa in enumerate(a):
    if i %2 == 0 and aa%2==1:
        count += 1
print(count)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
n=int(input())

a= list(map(int,input().split()))
con=0
for i in range(n):
    if i%2==0:
        if a[i]%2==1:
            con+=1
print(con)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
ans = 0
for i, a in enumerate(A):
    if i%2: continue
    ans += (a%2==1)
print(ans)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

N, = map(int, input().split())
A = map(int, input().split())

ans = 0
for i, ai in enumerate(A):
    if i%2==0 and ai%2==1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, numpy, string
import sys
from bisect import bisect_left, bisect_right, insort
from collections import deque
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def MS(): return map(str, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
# N = I()
# A = [LI() for _ in range(N)]
n = I()
a = LI()
ans = 0
for i in range(n):
    if i % 2 == 0 and a[i]%2 == 1:
        ans += 1
        
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
val=0
for i in range(n):
    if((i%2==0)and(l[i]%2!=0)):
        val+=1
print(val)

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    N = int(input())
    A = map(int, input().split())

    ans = 0
    for i, a in enumerate(A, start=1):
        if i % 2 and a % 2:
            ans += 1
    print(ans)


main()

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(n):
    if i % 2 == 0:
        if a[i] % 2 == 1:
            cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split(' ')))

cnt = 0
for i in range(0,n,2):
    if a[i] % 2 == 1:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
#b
n=int(input())
a=list(map(int,input().split()))

print( sum((i+1)%2==1 and a[i]%2==1 for i in range(n)) )

Submission status: Accepted

Solution code:
from sys import stdin
import sys

N = int(input())
a = list(map(int, input().split()))
cnt = 0
for i, v in enumerate(a):
    # print(i+1,v)
    if (i+1) % 2 == 1 and v % 2 == 1:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
def main():
    input()
    array = [int(x) for x in input().split()]
    ans = 0
    for i, v in enumerate(array):
        i += 1
        if i % 2 == 1 and v % 2 == 1:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

ans = 0
for i in range(N):
  if i%2 == 0:
    if A[i]%2 == 1:
      ans += 1
      
print(ans)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
n = int(input())
nums = list(map(int, input().split()))

out = 0
for i, n in enumerate(nums, 1):
    if n % 2 == 1 and i % 2 == 1:
        out += 1

print(out)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]

ans = 0
for i in range(N):
  if i % 2 == 0:
    if A[i] % 2 == 1:
      ans += 1

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = [0] + list(map(int, input().split()))
cnt = 0

for i in range(1,n+1):
    if i % 2 == 1 and a[i] % 2 == 1:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
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+=1
print(c)

Submission status: Accepted

Solution code:
n=int(input())
a=[0]+list(map(int, input().split()))

ans=0

for i in range(1, n+1):
    if i%2==1 and a[i]%2==1:
        ans+=1

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(N):
    if (i+1) % 2 != 0 and a[i] % 2 != 0:
        count +=1
print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub


import sys
# sys.setrecursionlimit(10**6)
# buff_readline = sys.stdin.buffer.readline
buff_readline = sys.stdin.readline
readline = sys.stdin.readline

INF = 2**62-1


def read_int():
    return int(buff_readline())


def read_int_n():
    return list(map(int, buff_readline().split()))


def read_float():
    return float(buff_readline())


def read_float_n():
    return list(map(float, buff_readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()

def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, A):
    ans = 0
    for i, a in enumerate(A, start=1):
        if i % 2 == 1 and a % 2 == 1:
            ans += 1
    return ans


def main():
    N = read_int()
    A = read_int_n()
    print(slv(N, A))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))
count=0
for i in range(N):
    if (i+1)%2==1:
        if A[i]%2==1:
            count+=1

print(count)

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
a = rl()
cnt = 0
for idx, i in enumerate(a, 1):
  if idx&1 and i&1:
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))

c = 0
for i in range(0,n,2):
    if a[i] % 2:
        c += 1

print(c)

Submission status: Accepted

Solution code:
# aising2020_d.py
N = int(input())
A = list(map(int,input().split()))
cnt = 0
for i,v in enumerate(A):
    if (i+1)%2==1 and v%2==1:
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
squares = list(map(int, input().split()))
count = 0
for i in range(N):
    if (i+1) % 2 and squares[i] % 2:
        count += 1
print(count)

Submission status: Accepted

Solution code:
import sys
import math
import statistics
import itertools
from collections import deque

n=int(input())
#l,r,d=map(int,input().split())
lis=list(map(int,input().split()))
ans=0
for i in range(n):
    if (i+1)%2==1 and lis[i]%2==1:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
c=0
for i in range(1,n+1):
  if(i%2!=0 and l[i-1]%2!=0):
    c+=1
print(c)

Submission status: Accepted

Solution code:
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return map(int, sys.stdin.readline().split())
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())


def FLIST(n):
    res = [1]
    for i in range(1, n+1):
        res.append(res[i-1]*i % DVSR)
    return res


N = II()
AS = [0]+list(LI())

res = 0
for i in range(1, N+1):
    res += AS[i] % 2 and i % 2

print(res)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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 += 1

print(c)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))

ans = 0
for i in range(N):
  if (i+1)%2 and A[i]%2:
    ans += 1
    
print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
#N, K = (int(i) for i in input().split())
#B = [int(x) for x in input().split()]
#A = [[int(i) for i in input().split()] for i in range(N)]
N = int(input())
a = [int(x) for x in input().split()]

count = 0

for i in range(N):
    if (i+1)%2 == 1 and a[i]%2 == 1:
        count += 1
print(count)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]

ans = 0
for idx, a in enumerate(A):
    if (idx+1) % 2 == 1 and a % 2 == 1:
        ans += 1
        
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a_list = list(map(int,input().split()))
count = 0
for i in range(n):
  if (i+ 1) % 2 ==1 and a_list[i] % 2 == 1 :
    count += 1
print(count)

Submission status: Accepted

Solution code:
#! /usr/bin/env python3

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

N, *A = map(int, read().split())

cnt = 0
for i, a in enumerate(A, 1):
    if (i % 2 == 1) & (a % 2 == 1):
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
c = 0
for i in range(len(a)):
  if (i+1)%2 == 1 and a[i]%2 == 1:
    c += 1
print(c)

Submission status: Accepted

Solution code:
def resolve():
    N = int(input())
    A = [int(i) for i in input().split()]
    cnt = 0
    for a in A[::2]:
        if a % 2 == 1:
            cnt += 1
    print(cnt)

resolve()

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in input().strip().split()]


res=0
for i in range(n):
    if i%2==0 and a[i]%2==1:
        res+=1

print(res)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))

counter = 0
for i in range(N):
    if i%2==0 and a[i]%2==1:
        counter += 1
print(counter)

Submission status: Accepted

Solution code:
n=int(input())

a=list(map(int,input().split()))

cnt=0

for i in range(n):
    if (i+1)%2!=0 and a[i]%2!=0:
        cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
A = list(map(int,readline().split()))
ans = 0
for i in range(N):
    if i % 2 ==0 and A[i] % 2 ==1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))

cnt = 0
for i in range(n):
    if l[i] % 2 == 1 and i % 2 == 0:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
n = int(input())
vs = list(map(int, input().split()))

count = 0
for i, a in enumerate(vs):
    if (i+1) % 2 == 0:
        continue

    if a % 2 == 1:
        count += 1
print(count)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
N = int(input())
A = [0] + list(map(int, input().split()))
cnt = 0
for i in range(1, N+1):
    if i%2 == 1 and A[i]%2 == 1:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
def Main(N, A):
    ans = 0
    for i in range(0, N, 2):
        if A[i] % 2 != 0:
            ans += 1
    return ans
        
    
res = Main(N, A)
print(res)

Submission status: Accepted

Solution code:
n=int(input())
b=0
a=list(map(int,input().split()))
for i in range(n):
    if a[i]%2==1 and (i+1)%2==1:
        b+=1
print(b)

Submission status: Accepted

Solution code:
N=int(input())
A=list(map(int,input().split()))

ans=0

for a in range(0,N,2):
  if A[a]%2==1:
    ans+=1
    
print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

#n = int(input())
#l = list(map(int, input().split()))

'''
a=[]
b=[]
for i in range():
    A, B = map(int, input().split())
    a.append(A)   
    b.append(B)'''

n=int(input())
cnt=0
a=list(map(int, input().split()))
for i in range(0,n,2):
    if a[i]%2==1:
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
def resolve():
    N = int(input())
    A = list(map(int,input().split()))
    count = 0
    for i in range(N):
        if i % 2 == 0 and A[i]%2==1:
            count+=1
    print(count)
resolve()

Submission status: Accepted

Solution code:
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

n=ii()
a=li()

cnt=0
for i in range(n):
    if(i%2==0 and a[i]%2==1):
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
#関数リスト
import sys
import numpy as np
input = sys.stdin.readline

 
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

n = I()
mylist = LI()
result = 0
for i, num in enumerate(mylist):
    if i % 2 == 0 and num % 2 == 1:
        result+=1
print(result)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
N = int(input())

A = list(map(int, input().split()))

count = 0
for i, a in enumerate(A):
  if i % 2 == 0 and a % 2 == 1:
    count += 1

print(count)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(700000)

def s_in():
    return input()

def n_in():
    return int(input())

def l_in():
    return list(map(int, input().split()))

n = n_in()
A = l_in()

print(sum(A[i]%2 ==1 for i in range(0,n,2)))

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(n):
    ans+=(i%2==0 and a[i]%2==1)
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = [0] + list(map(int, input().split()))

ans = 0
for i in range(1, len(A), 2):
    if A[i] % 2 == 1:
        ans += 1
print(ans)