My issue
Can anyone please help me out with this "Chef And Dolls " Problem. The following code satisfactorily runs for test case-1 but fails at the special case. Can anyone explain the logic behind solving the question and why this method fails.
My code
# cook your dish here
for _ in range(int(input())) :
n=int(input())
c=0
for j in range(n) :
i=int(input())
if i%2!=0 :
c+=1
print(c)
Learning course: Arrays, Strings & Sorting
Problem Link: CodeChef: Practical coding for everyone