Given a large positive number N having x digits, the task is to count all rotations of the given number which are divisible by 4.
Input: 8 Output: 1 Input: 20 Output: 1 Rotation: 20 is divisible by 4 02 is not divisible by 4
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains a number N.
For each test case in a new line print the count of all rotations of N which are divisible by 4.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.