Reverse the number
m = m * 10 + x % 10 NEW_LINE x = x // 10 NEW_LINE return ( abs ( n - m ) % k == 0 ) NEW_LINE def countNumbers ( l , r , k ) : NEW_LINE count = 0 NEW_LINE for i in range ( l , r + 1 ) : NEW_LINE if ( isRevDiffDivisible ( i , k ) ) : NEW_LINE INDENT count = count + 1 NEW_LINE DEDENT return count NEW_LINE