Showing:
Handle Score
@Ibrahim Nash 6564
@mb1973 5785
@Quandray 5275
@akhayrutdinov 5111
@saiujwal13083 5074
@kirtidee18 4639
@sanjay05 3762
@mantu_singh 3712
@gfgaccount 3627
@marius_valentin_dragoi 3525
Finger Game
Basic Accuracy: 47.53% Submissions: 707 Points: 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.

Example 1:

Input:
N = 3
Output:
3
Explanation:
3 ends on the finger 3.

Example 2:

Input:
N = 6
Output:
4
Explanation:
6 ends on the finger 4.

You don't need to read input or print anything. Your task is to complete the function fingerCount() which takes an integer N as input parameter and returns the finger number on which this number ends.

Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)

Constraints:
1 <= N <= 10^6