##
Count rotations divisible by 4
March 28, 2017

Given a large positive number as string, count all rotations of the given number which are divisible by 4. Examples: Input: 8 Output: 1 Input: 20 Output: 1 Rotation: 20 is divisible by 4 02 is not divisible by 4 Input : 13502 Output : 0 No rotation is divisible by 4 Input : 43292816… Read More »