Skip to content

Instantly share code, notes, and snippets.

@LivingInSyn
Created August 15, 2017 15:27
Show Gist options
  • Save LivingInSyn/91ac2da2534c6d054bf8efdd5d1d7855 to your computer and use it in GitHub Desktop.
Save LivingInSyn/91ac2da2534c6d054bf8efdd5d1d7855 to your computer and use it in GitHub Desktop.
month30 = [4, 6, 9, 11]
month31 = [1, 3, 5, 7, 8, 10, 12]
for year in range(17,100):
for month in range(1,13):
if month in month30:
upper = 31
elif month in month31:
upper = 32
else:
if year % 4 == 0:
upper = 30
else:
upper = 29
for day in range(1,upper):
if (day**2 + month ** 2) == (year ** 2):
print("Year: {}, Month: {}, Day: {}".format(year, month, day))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment