Skip to content

Instantly share code, notes, and snippets.

@shounaklohokare
Last active Dec 25, 2020
Embed
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:
beautifulDays+=1
return beautifulDays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment