Calculate the number of cans of soda you can drink based on your weight

A U.S. government research laboratory has concluded that artificial sweeteners commonly used in soda are causing the deaths of laboratory rats. A friend of yours is trying desperately to lose weight, but he can't give up soda. Your friend wants to know how much soda you can drink without dying. Please write a program to help him answer this question. It is known that at the time of the experiment, the amount of artificial sweetener used to kill a mouse was 5g, and the weight of the mouse was 35g. It is assumed that the lethal dose in rats corresponds proportionally to the lethal dose in humans. A 350g can of soda contains 0.1% artificial sweetener. Enter your friend's weight (Kg) and output the maximum number of cans of soda he can drink.

Idea: Find the maximum sweetener that a person can tolerate and the sweetener in a can of Coke, divide the former by the latter

Guess you like

Origin blog.csdn.net/cool_tao6/article/details/127822261