Skip to content

Instantly share code, notes, and snippets.

Last active Dec 25, 2020
What would you like to do?
def beautifulDays(i, j, k):
beautifulDays = 0
for day in range(i, j+1):
rev = int(str(day)[::-1])
if abs(rev-day)%k==0:
return beautifulDays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment