Find the remainder
Submissions: 3881   Accuracy:

14.21%

  Difficulty: Basic   Marks: 1

You will be given some numbers and your task is to find the remainders when those numbers are divided by 7.

Input:
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.

Output:
Corresponding to each test case, in a new line, print the remainder you get when you divide the number by 7.

Constraints:
1 ≤ T ≤ 100
1 ≤ N ≤ 10105

Example:
Input
2
98
2067355
Output
0
3

 

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

Author: Hemang Sarkar


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.