# 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
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