You are viewing a single comment's thread. Return to all comments →
same code, easier to understand
def beautifulDays(i, j, k): count = 0 for day in range(i,j+1): rev_day = int(str(day)[::-1]) diff = abs(day-rev_day) remain = diff % k if remain == 0: count+=1 return count
Beautiful Days at the Movies
You are viewing a single comment's thread. Return to all comments →
same code, easier to understand