Explanation Popsicles | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Explanation Popsicles

I want to try it but dont understand what is all about. Dont put code in, just please explain, advice, details Popsicles +10 XP You have a box of popsicles and you want to give them all away to a group of brothers and sisters. If you have enough left in the box to give them each an even amount you should go for it! If not, they will fight over them, and you should eat them yourself later. Task Given the number of siblings that you are giving popsicles to, determine if you can give them each an even amount or if you shouldn't mention the popsicles at all. Input Format Two integer values, the first one represents the number of siblings, and the second one represents the number of popsicles that you have left in the box. Output Format A string that says 'give away' if you are giving them away, or 'eat them yourself' if you will be eating them yourself. Sample Input 3 9 Sample Output give away

10th May 2020, 9:58 AM
Mateusz Legend
Mateusz Legend - avatar
3 Answers
+ 5
If you have 3 siblings & 9 popsicles, then you can share them without argument, because each sibling will get 3 popsicles. But if you have 4 siblings & 9 popsicles, you can't share them evenly. The siblings will fight because some-one got more. So eat them yourself
10th May 2020, 10:11 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 7
Okey i got IT. Thanks for explanation https://code.sololearn.com/cMhx9d2J7sUy/?ref=app
10th May 2020, 11:40 AM
Mateusz Legend
Mateusz Legend - avatar
0
The task is to determine if the second input can be divided without rest via the first input.
10th May 2020, 10:03 AM
Manu_1-9-8-5
Manu_1-9-8-5 - avatar