Click here to Skip to main content
15,664,273 members
Please Sign up or sign in to vote.
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
Comments
Patrice T 21-Apr-22 23:16pm    
Share your code.
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    
How to get an answer to your problem.
1. Use the "Improve question" link to edit your post
2. In the "What I have tried:" section paste the code that you have already tried
3. In the Description of your problem type in your expected results and your actual results

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.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900