[Mš Challenge] Finger Counting āšā
Monday Blue š Challenge Series #13 Let's do some counting this week! This time we will need to determine which finger was last counted using Sololand's arithmetic. Assume that we will use both our hands with 5 fingers, here's how we do the counting start with the left-hand:- ā Left Hand Thumb: 1 Index: 2 Middle: 3 Ring: 4 Baby: 5 ā Right Hand Thumb: 6 Index: 7 Middle: 8 Ring: 9 Baby: 10 Once we reached to the end, we will continue to count backwards and here's the label for each of the fingers count up to 31:- ā Left Hand Thumb: 1, 19 Index: 2, 18, 20 Middle: 3, 17, 21 Ring: 4, 16, 22 Baby: 5, 15, 23 ā Right Hand Thumb: 6, 14, 24 Index: 7, 13, 25, 31 Middle: 8, 12, 26, 30 Ring: 9, 11, 27, 29 Baby: 10, 28 š¼ TASK Write a program to accept an integer and determine which finger was last counted with the given number. š§ TEST CASE 10 ā” "Baby Finger (Right)" 22 ā” "Ring Finger (Left)" 25 ā” "Index Finger (Right)" 42 ā” "Thumb (Right)" 101 ā” "Ring Finger (Right)" 1001 ā” "Ring Finger (Right)" 25122017 ā” "Ring Finger (Right)" 31122017 ā” "Middle Finger (Left)" ā¤ BONUS Clear-cut and optimized approach is encouraged. š SPECIAL MENTION Straightforward ver. https://code.sololearn.com/cTEi6zPl6NDA/?ref=app Visualization ver. https://code.sololearn.com/WV5D4LC34BRb/?ref=app Happy Coding!!! šš»