experience in the Uncooking skill (a skill dedicated to the uncooking of cooked fish), and he would like to get
experience in Uncooking. In order to do so, he will need to uncook fish, with the uncooking of each fish awarding him experience. Uncooking each fish costs
coins each, and gives
base experience.
A player may also possess bonus experience in a skill. Bonus experience is converted into actual experience every time a player gains experience, with amount of bonus experience used up equal to the base experience earned. bonus experience in the uncooking skill.
On Double XP Weekend, experience. This effect does not stack with bonus experience on Double XP Weekend: assuming he has enough bonus experience, earns
experience every time he uncooks fish, consuming
bonus experience.
experience.
Input Specification
The input consists of the following integers, each on its own line, in order:
: 's current experience in Uncooking
.
: 's desired experience in Uncooking
.
: 's current bonus experience in Uncooking
.
: the experience gained by the type of fish is Uncooking
.
: the cost per fish
.
Output Specification
The output consists of two lines, the first containing the number of fish
needs to uncook, and the second the amount of coins doing so would cost him.Sample Input
1798808
9684577
1048576
325
4428
Sample Output
10519
46578132
Explanation
experience in Uncooking and he wants to get to
experience. He has
bonus experience. In order to do so, he will be uncooking food that gives
experience per item, with each food item costs
to uncook.
- For the first
fish uncooks, he earns
base experience,
extra experience from Bonus XP Weekend, and
bonus experience is converted to real experience, for a total of
experience per fish. This will earn him
experience, in total.
- For the
fish, he would only convert
bonus experience, as he has no more left. This makes him earn
experience for it.
- If he uncooks
more fish, he would be able to get
more experience (at the rate of
per fish, since he is out of bonus experience).
After finishing his supply of fish, his final experience would be , which is
experience above his goal. He could not uncook less fish and still reach his goal.
Therefore, fish, at a cost of
coins.
Comments
I is not understand this problem
Why do I understand everything about the question, including the rules of double XP, the 200 million xp constraint, the uncooking skill, and the name of the MMORPG? I feel like I have no life. -_-
Maybe you do...
PS NXT Client FTW.
This problem is way too real.
GZ ON 99 SUMMONING o wait
For
and
, the constraints refer to
>_<