Azad’s mother gave him Rs. 100 so he decided to buy some chocolates, he went to a shop and that shop only has chocolates of Rs. 3 and Rs. 7 so it now depends on Azad’s mood how many chocolates he will buy. May be he will not buy a single chocolate. Can you tell the possible remaining amount he has after coming from that shop. If N (0≤ N ≤ 100) is equal to possible remaining amount he has after he came from that shop print 1 else 0.
For example : Input 99
Explanation : It is not possible so output is 0.
For example : Input 97
Explanation : 100 - (1 * 3 + 0 * 7) = 97 so output is 1.
The first line of the input contains a single integer T denoting the number of test cases. The first line of each test case contains N.
For each test case, output 0 or 1.
1 ≤ T ≤ 101
0 ≤ N ≤ 100
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.