I am using this python code and have tested with several test cases…but still getting wrong.
def is_leap(year):
if((year%4==0 and year%100!=0) or (year%400==0)):
return True
return False
t = int(input())
for _ in range(t):
l = list(map(int, input().split(’:’)))
seq=[]
if (is_leap(l[0])==True):
seq=[0,31,29,31,30,31,30,31,31,30,31,30,31]
else:
seq=[0,31,28,31,30,31,30,31,31,30,31,30,31]
counter=0
# print(seq[l[1]])
for x in range(l[2],seq[l[1]]+1,2):
# print(x)
counter+=1
print(counter)