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

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.

cs_abhi | 62 |

kya_bolti_public | 56 |

Shubhankar Sharma | 44 |

vermaankush14291 | 42 |

coderquill | 40 |

PiyushPandey4 | 856 |

john_wick | 757 |

ASWATHAMA | 565 |

akhyasharma01 | 547 |

UsfShilpa | 536 |

blackshadows | 5362 |

Ibrahim Nash | 5242 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4598 |

Login to report an issue on this page.