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.

agness | 122 |

aman1931998 | 102 |

Survivor | 100 |

uchitnitk | 96 |

lonecoder | 95 |

KshatriyaYash | 1066 |

nikhil_sojan | 1032 |

lonecoder | 1030 |

mazumderrohit8 | 899 |

SumitSingh27 | 832 |

blackshadows | 5327 |

Ibrahim Nash | 5215 |

akhayrutdinov | 5111 |

mb1973 | 4492 |

Quandray | 4444 |

Login to report an issue on this page.