Function to check if N is a divisor of its right - rotation
function rightRotationDivisor ( N ) { let lastDigit = N % 10 ; let rightRotation = ( lastDigit * Math . pow ( 10 , Math . floor ( ( Math . log10 ( N ) ) ) ) + Math . floor ( N / 10 ) ) ; return ( rightRotation % N == 0 ) ; }