- 1

how to create a program

hello, I was given the task to create a program, but I do not know how, only an explanation is given Only one thing was missing for Mr. Walters to be completely happy: the opportunity to present the award Bible and boast of a miracle of learning. Some schoolchildren had yellow tickets, but no one had as many as they needed - he had already interviewed all the first students. And at the very moment when all hope left him, Tom Sawyer stepped forward with nine yellow tickets, nine red and ten blue, and demanded a Bible. Mark Twain. Adventures of Tom Sawyer To receive one award, you need to present 1010 yellow tickets. 1010 red tickets can be exchanged for one yellow one. 1010 blue tickets can be exchanged for one red one. Tom now has yy yellow tickets, rr red and bb blue. How many awards can Tom get? Input data format: Three lines of the input file contain three natural numbers: yy, rr and bb. All numbers do not exceed 2×10^9.

27th May 2022, 2:03 PM
Valera fell
Valera fell - avatar
2 Answers
+ 1
You input three lines of data. Then start from smalest value, what is blue and divide its number with 1010 and add to red. Then divide the resulted red number with 1010 and add the result to yellow. After that divide the number of yellow tickets with 1010, what equals to the awards and print it.
27th May 2022, 2:48 PM
JaScript
JaScript - avatar
- 2
Output format: Derive one non-negative integer, the number of rewards That Tom can receive. there should not be a decimal point in the record of this number, that is, the output "1.0" instead of "1" is incorrect
27th May 2022, 2:05 PM
Valera fell
Valera fell - avatar