Special Eggplant
Time limit1sMemory limit1024 MB
Given beef per roll N, total beef M, and eggplant per roll K, the task is to compute total eggplant grams needed as (M/N)*K.
- Level
Easy1 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
Have some eggplant instead...
Last year, NLCS Jeju fended off a campaign by students who opposed "Parmesan-breaded fried beef" (hereafter "Parmesan beef") and launched a new menu item, "Parmesan-breaded fried beef kimbap" (hereafter "Parmesan beef kimbap").
The students, however, would rather eat fresh eggplant than Parmesan beef! So they plan to buy eggplant and swap out all the Parmesan beef in today's lunch Parmesan beef kimbap for eggplant. To do this, they need to work out how many grams of eggplant to buy.
- Each roll of Parmesan beef kimbap contains exactly grams of Parmesan beef.
- The school used grams of Parmesan beef to make today's kimbap.
- The number of rolls the school makes is an integer. For example, the school cannot make 2.5 rolls.
- Each roll of Parmesan beef kimbap must have exactly grams of eggplant swapped in for its Parmesan beef.
Find the minimum number of grams of eggplant the students must buy to replace all the Parmesan beef the school made into eggplant.
Input
The first line contains the integer , the grams of Parmesan beef in one roll of Parmesan beef kimbap.
The second line contains the integer , the grams of Parmesan beef the school used.
The third line contains the integer , the grams of eggplant needed for one roll.
Output
On one line, print the minimum number of grams of eggplant the students must buy.
Constraints
is a multiple of .