You are viewing a single comment's thread. Return to all comments →
** Python solution in 1 line **
def beautifulDays(i, j, k): return sum([abs(num - int(str(num)[::-1]))%k==0 for num in range(i, j+1)])
Seems like cookies are disabled on this browser, please enable them to open this website
Beautiful Days at the Movies
You are viewing a single comment's thread. Return to all comments →
** Python solution in 1 line **
def beautifulDays(i, j, k): return sum([abs(num - int(str(num)[::-1]))%k==0 for num in range(i, j+1)])