Sok
의견: 0
Mirko and Slavko bought a few litters of orange, apple and pineapple juice.
They are now whipping up a non alcoholic cocktail following a recipe they
found on the Internet. Sadly, they figured out too late that not only you
should use recipes when making cocktails, you should also use them when
planning how much juice to buy.
Write a program that will determine how much of each juice they will have
leftover, after they make as much cocktail as possible, respecting the recipe.
The first line contains three integers, \(A\), \(B\), \(C\) (\(1 \le A, B, C \le 500\)), amount of orange, apple and pineapple juice they bought, in litres.
The second line contains three integers, \(I\), \(J\), \(K\) (\(1 \le I, J, K \le 50\)), the ratio of orange, apple and pineapple juice in the cocktail.
The first and only line of output should contain three decimal numbers, the leftover amounts of each juice, in litres.
Note: solutions with relative error \(10^{-4}\) or smaller will be accepted.
| 서브태스크 | 점수 | 설명 |
|---|---|---|
Test 1 | 10점 | None |
Test 2 | 10점 | None |
Test 3 | 10점 | None |
Test 4 | 10점 | None |
Test 5 | 10점 | None |
Test 6 | 10점 | None |
Test 7 | 10점 | None |
Test 8 | 10점 | None |
Test 9 | 10점 | None |
Test 10 | 10점 | None |
10 10 10
3 3 30 0 09 9 9
3 2 10 3 610 15 18
3 4 10 1.666667 14.666667평가 및 의견
Sok
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Sok