게시판 즐겨찾기
편집
드래그 앤 드롭으로
즐겨찾기 아이콘 위치 수정이 가능합니다.
코딩문제(를가장한 수학문제)
게시물ID : programmer_7775짧은주소 복사하기
작성자 : kosta
추천 : 0
조회수 : 794회
댓글수 : 4개
등록시간 : 2015/01/22 17:11:12
프로그램 명: coci_sok(special judge)
제한시간: 1 초

[문제 요약] 미코와 슬라브코는 몇 리터의 오렌지, 사과 ,파인애플 쥬스를 샀다.

그들은 인터넷에서 찾은 요리법으로 무 알콜 칵테일을 만들려고 한다.

가능한 많은 칵테일을 만든 후 남겨진 세 쥬스의 남은 양을 구하는게 문제이다. 오차가 10^-4 이하이면 정답으로 인정한다.

예를 들어 오렌지 , 사과 ,파인애플을 산 양(리터)이 9 9 9 이고 칵테일을 만들 때 섞는 비율이 3:2:1 이었다면 각 쥬스의 남겨진 양은 0,3,6 리터이다.


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 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.

입출력 예

입력  10 10 10 3 3 3  출력  0 0 0  입력  9 9 9 3 2 1  출력  0 3 6  입력  10 15 18 3 4 1  출력  0 1.666667 14.666667
전체 추천리스트 보기
새로운 댓글이 없습니다.
새로운 댓글 확인하기
글쓰기
◀뒤로가기
PC버전
맨위로▲
공지 운영 자료창고 청소년보호