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