#969
Unrated
SOK
시간 제한
1s
메모리 제한
32MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.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 ≤A, B, C ≤500), amount of orange, apple and pineapple juice they bought, in liters. The second line contains three integers, I, J, K, (1 ≤I, J, K ≤50), the ratio of orange, apple and pineapple juice in the cocktail.

출력

The first and only line of output should contain three decimal numbers, leftover amounts of each juice, in liters. Note: solutions with relative error 10-4 or smaller will be accepted.

예제 입력 1

10 10 10
3 3 3

예제 출력 1

0.000000 0.000000 0.000000

예제 입력 2

9 9 9
3 2 1

예제 출력 2

0.000000 3.000000 6.000000

예제 입력 3

10 15 18
3 4 1

예제 출력 3

0.000000 1.666667 14.666667
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.