[MšŸ’™ Challenge] Finger Counting āœ‹šŸ––āœ‹ | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 45

[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!!! šŸ˜šŸ’»

18th Dec 2017, 1:08 PM
Zephyr Koo
Zephyr Koo - avatar
50 Respostas
11th Dec 2017, 7:24 PM
Hiroki Masuda
Hiroki Masuda - avatar
+ 24
My try : https://code.sololearn.com/cI2iO789G5WY/?ref=app Thanks for the challenge.
11th Dec 2017, 4:38 AM
Swapnil Srivastava
Swapnil Srivastava - avatar
11th Dec 2017, 5:34 AM
qwerty
qwerty - avatar
+ 21
https://code.sololearn.com/cVg5dUTG2C2X/?ref=app
11th Dec 2017, 7:24 AM
LukArToDo
LukArToDo - avatar
+ 21
I already did this but this time I'm going to use assembly because of how easy this challenge is. https://code.sololearn.com/c0DaHRV9x1nZ/?ref=app
14th Dec 2017, 11:56 AM
qwerty
qwerty - avatar
+ 18
Waiting for the next challenge.
18th Dec 2017, 8:01 AM
qwerty
qwerty - avatar
+ 17
@blackcat1111 Thank you! Again, this was inspired from the riddle I've solved when I was small and I hope you all have fun solving it! Yes you guess is correctly as it's trivial if you learnt the concept before. However I believe the easier the problem, the more challenging to write a clean code which distinct from others. Enjoy! šŸ˜‰
11th Dec 2017, 4:36 AM
Zephyr Koo
Zephyr Koo - avatar
+ 17
@blackcat1111 Wow that was real fast! Thank you for your submission! XD
11th Dec 2017, 5:34 AM
Zephyr Koo
Zephyr Koo - avatar
+ 16
Sorry it took so long! My code is pretty long and very inconvenient though. šŸ˜… https://code.sololearn.com/cEADoKAkK77s/?ref=app
11th Dec 2017, 5:02 AM
blackcat1111
blackcat1111 - avatar
+ 16
https://code.sololearn.com/cUx6K6ageo4G/?ref=app
11th Dec 2017, 8:24 AM
KƤzĆ® MrĆ®dĆ¹l HĆøssƤƮn
KƤzĆ® MrĆ®dĆ¹l HĆøssƤƮn - avatar
+ 16
I'm really late šŸ˜‚šŸ˜‚. But I did a good work here, thou šŸ˜‰ https://code.sololearn.com/cLl91n16DRKk/?ref=app
31st Dec 2017, 2:37 PM
Justine Ogaraku
Justine Ogaraku - avatar
+ 15
https://code.sololearn.com/cl8xT0ML77D4/?ref=app
11th Dec 2017, 7:37 AM
Aayush Bhansali
Aayush Bhansali - avatar
+ 14
Thanks šŸ˜šŸ˜‚
1st Jan 2018, 2:26 PM
Justine Ogaraku
Justine Ogaraku - avatar
+ 12
My try, I love Zephyr's Challenges https://code.sololearn.com/cSmDA7H3T7pX/?ref=app
11th Dec 2017, 10:13 AM
David Akhihiero
David Akhihiero - avatar
+ 12
Thanks everyone for your participation! Apologize for late review today as I'm kinda occupied and I seems to facing drought for my idea faucet. Again, we got submissions featured in SPECIAL MENTION this time and I hope you really enjoy the challenge. Let's move on to the next challenge! ā¤ https://www.sololearn.com/Discuss/937081/?ref=app
18th Dec 2017, 2:33 PM
Zephyr Koo
Zephyr Koo - avatar
+ 11
@Ace Not really, at least it's easier to read compared to traditional if-else with proper indentation. šŸ˜‚
11th Dec 2017, 2:32 PM
Zephyr Koo
Zephyr Koo - avatar
12th Dec 2017, 4:24 PM
AZTECCO
AZTECCO - avatar
+ 11
Here it is. My visual solution. Though I can't find a complete sprite sheet with closed fist.šŸ˜„ https://code.sololearn.com/WV5D4LC34BRb/?ref=app
14th Dec 2017, 12:18 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
+ 10
Wow. How do you come up with such creative ideas? Anyways, seems easy enough (subject to change) so I'll give it a try. šŸ˜‰
11th Dec 2017, 4:28 AM
blackcat1111
blackcat1111 - avatar