Олимпиадный тренинг

Задача 38478. Purchase


Задача

Темы: Вывод формулы
The pen cost K rubles. On September 1, the cost of a pen increased by exactly P percent. Determine how many pens you can buy for S rubles after the rise in price.
The program receives three positive integers as input. The first number is K – the cost of the pen in rubles before the rise in price. Second number P – pen price increase
in percentages. Third number S – available amount of money. The numbers K and S do not exceed 107 , the number P does not exceed 100.
 
Examples
# Input Output Explanation
1 33
5
100
2 The pen cost 33 rubles. After a 5% rise in price, the pen will cost 34 rubles 65 kopecks (note that, since the initial
the price of the pen was an integer number of rubles, after the rise in price, the cost of the pen will be expressed in an integer number of rubles and kopecks).
For 100 rubles after the rise in price, you can buy 2 pens.