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

Solution (Python):
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

Solution (Python):
from sys import stdin
from sys import setrecursionlimit
from collections import Counter, deque, defaultdict
from math import floor, ceil
from bisect import bisect_left
from itertools import combinations
setrecursionlimit(100000)

INF = int(1e10)
MOD = int(1e9 + 7)

def main():
    from builtins import int, map
    N = int(input())
    A = list(map(int, input().split()))
    count = 0
    for i, ai in enumerate(A):
        if (i + 1) % 2 == 1 and ai % 2 == 1:
            count += 1
    print(count)

if __name__ == '__main__':
    main()

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    a = LI()
    ans = 0
    for i in range(n):
        if not i&1:
            if a[i]&1:
                ans += 1
    print(ans)
    return


if __name__ == "__main__":
    solve()

Solution (Python):
n = int(input())
li = list(map(int,input().split()))
ans = 0

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

print(ans)

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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)

Solution (Python):
import sys
input = sys.stdin.readline

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

def main():
    mod=10**9+7
    N=I()
    a=LI()
    cnt=0
    for i in range(N):
        if i%2==0 and a[i]%2==1:
            cnt+=1
            
    print(cnt)

main()

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

Solution (Python):
def main():
    N = int(input())
    A = list(map(int, input().split()))
    c = 0
    for i, a in enumerate(A):
        if i % 2 == 0 and a % 2 == 1:
            c += 1


    return c

print(main())

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

Solution (Python):



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)