Azad and Chocolates
Submissions: 851   Accuracy:

25.83%

  Difficulty: Basic   Marks: 1

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

                            Output   0

Explanation :  It is not possible so output  is 0.

For example :     Input    97

                           Output   1

Explanation : 100 - (1 * 3 + 0 * 7) = 97 so output  is 1.

Input 

    • 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. 

Output 

  • For each test case, output 0 or 1. 

Constraints 

    •    1 ≤ T ≤ 101 

    •    0 ≤ N ≤ 100
 

Example 
Input: 
4
93
97
94
99

Output: 
1
1
1
0

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: CHANDRAKANT
Author: TheRed_Viper


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.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.