Finger Game
Submissions: 3192   Accuracy:

38.76%

  Difficulty: Basic   Marks: 1

Count the given numbers on your fingers and find the correct finger on which the number ends.

  • The first number starts from the thumb, second on the index finger, third on the middle finger, fourth on the ring finger and fifth on the little finger.
  • Again six comes on the ring finger and so on.

Input:
First line consists of T test cases. Only line input, one integer N.

Output:
Single line output, print the number of finger.

Constraints:
1<=T<=5000
1<=N<=5000

Example:
Input:

2
1
2
Output:
1
2

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

Contributor: Saksham Raj Seth
Author: saksham seth


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.