405703: GYM102051 D Nate and Dimension-Hopping Money

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. Nate and Dimension-Hopping Moneytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

One Wednesday evening, Nate went out drinking milk tea with his friends, spending $$$x$$$% of his money on that day.

On Thursday, he checked his wallet and watched in confusion as $$$y$$$% of his money vanished before his very eyes!

He then remembers that on Tuesday, a similar event transpired as he checked his wallet and watched money magically appear in his wallet!

Realizing that the amount of money that appeared in his wallet on Tuesday is the exact same amount that he lost on Thursday, he deduced that the portion of money he lost on Thursday somehow went back in time and got transferred to his wallet on Tuesday!

This makes managing his finances confusing, and so he wants your help.

If he had $$$n$$$ Philippine pesos in his wallet on Monday, how much money would he have on each of the five weekdays this week?

Input

The input consists of a line containing three space-separated integers $$$n$$$, $$$x$$$, and $$$y$$$. The first integer, $$$n$$$, is the amount of money he had on Monday. The second integer, $$$x$$$, is the percentage of money in his wallet he had spent on Wednesday. The third integer, $$$y$$$, is the percentage of money in his wallet on Thursday that got sent back in time.

Constraints

$$$1 \leq n \leq 10^{8}$$$

$$$1 \leq x \leq 100$$$

$$$1 \leq y \leq 100$$$

Output

Output five space-separated integers: the amount of money Nate had on Monday, Tuesday, Wednesday, Thursday, and Friday, in that order.

The answer will be accepted if it is within $$$10^{-4}$$$ of the correct answer.

ExamplesInput
100 50 50
Output
100.0000 133.3333 66.6667 33.3333 33.3333
Input
100 25 25
Output
100.0000 123.0769 92.3077 69.2308 69.2308

加入题单

算法标签: