15,664,273 members
1.00/5 (1 vote)
See more:
Description
Use python to solve
There are 3 children(their names are A,B,C). A has 50 candies, B has 43 candies, C has 13 candies. Now they want to play a game.Start from A, each person break all his candies (so far he holds) into 3 parts, keeping one part for hisself and give other two parts to others, He eat the reaminder candies. In this way, at the end of the game. How many candies A, B and C has?

What I have tried:

I tried using python-for loop but I end up getting incorrect response
Posted
Updated 21-Apr-22 15:19pm
v2
Patrice T 21-Apr-22 23:16pm
CPallini 22-Apr-22 2:08am
Do you really need Python for this?
Richard MacCutchan 22-Apr-22 5:37am
No, any non-poisonous snake will do.
CHill60 22-Apr-22 5:24am
2. In the "What I have tried:" section paste the code that you have already tried

The really important bit here is "paste the code that you have already tried"

This is either homework or a learning exercise, so for it to be of any value to you, you must be the one that at least attempts to solve it. We will not just write a solution for you
Richard MacCutchan 22-Apr-22 5:39am
Answer: none, because they keep eating them.