-->
当前位置:首页 > 题库

PROGRAMMING:Running (2016 Nanhai primary school group A)

Luz5年前 (2021-05-10)题库536
Dairy cows lack of exercise recently, the body has gained weight, affecting the milk yield. So Farmer John decided to keep the cows running to keep up with the standard size. The farmer found the formula of standard body shape on the Internet: weight = height - 105, in which the unit of weight is kilogram and the unit of height is centimeter. Now the height of the cow is x cm, and the weight is y kg. After calculation, the farmer found that the weight of the cow is too heavy, so he made a running plan for the cow, and the cow needs to run C times for every 1 kg of weight loss. So how many times does a cow need to run to reach its standard size? Suppose the height of the cow does not change.
###Input format:
One line, three positive integers, x, y, C.
###Output format:
An integer that represents the total number of times a cow needs to run in order to reach its standard size.
###Input example:
```in
174 73 6
```
###Output example:
```out
twenty-four
```
The cow is 174CM in height and 73kg in weight.
According to the formula of standard body size, the standard weight of dairy cows should be: 174-105 = 69 kg, so dairy cows overweight 73-69 = 4 kg.
Because it takes six runs to lose 1 kg, the cows need to run 4 times in total × 6 = 24 times.
[data scale]
100% data, 105 < x < 250, X - 105 < y < 300, 1 < = C < = 10.







answer:If there is no answer, please comment