You will be given some numbers and your task is to find the remainders when those numbers are divided by 7.
The first line of input contains a single integer T denoting the number of test cases. Then T test cases follow. Each test case consists of a single line containing a positive integer N.
Corresponding to each test case, in a new line, print the remainder you get when you divide the number by 7.
1 ≤ T ≤ 100
1 ≤ N ≤ 10105
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.