Code not working (GREGORIAN CALENDAR)

My code is not being accepted even though I have checked the formula from the internet and crosschecked the output myself with a calender. And now RUNTIME ERROR(NZEC) is showing.
beginner - GREGORIAN CALENDAR
language - PYTHON 3.6
Can you please help and look into this.
MY CODE:-
for _ in range(int(input())):
y = int(input())
mc = 0
dc = 1
lc = 0
r = y % 100
y1 = y - r
yc = (r + (r // 4)) % 7
if y1 == 1900:
cc = 0
elif y1 == 2000:
cc = 6
elif y1 == 2100:
cc = 4
elif y1 == 2200:
cc = 2
elif y1 == 2300:
cc = 0
elif y1 == 2400:
cc = 6
elif y1 == 2500:
cc = 4
if y % 4 == 0:
if y % 100 == 0:
if y % 400 == 0:
lc = 1
d = (yc + mc + cc + dc - lc) % 7
if d == 0:
print(“sunday”)
elif d == 1:
print(“monday”)
elif d == 2:
print(“tuesday”)
elif d == 3:
print(“wednesday”)
elif d == 4:
print(“thursday”)
elif d == 5:
print(“friday”)
elif d == 6:
print(“saturday”)

It would be lot better if u can provide the submission link(if possible) or ideone link or try to indent the code properly and post problem link too.

1 Like