Please enter your email address or userHandle.
Given a number n, the task is to check if a number is divisible by 4 or not. The input number may be large and it may not be possible to store even if we use long long int.
Input : n = 1124
Output : 1
Input : n = 1234567589333862
Output : 0
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains an number n.
For each test case in a new line print 1 if n is divisible by 4 else print 0.
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Login to access your submissions.
Please choose 'ReadOnlyMode' if you needn't to 'Edit' the problem e.g. viewing OJ's solution, TestCase Files (TCFs), TimeLimit etc.