結果

問題 No.236 鴛鴦茶
ユーザー samplelpmas
提出日時 2016-12-10 08:28:55
言語 Java
(openjdk 23)
結果
AC  
実行時間 149 ms / 2,000 ms
コード長 456 bytes
コンパイル時間 1,993 ms
コンパイル使用メモリ 74,068 KB
実行使用メモリ 42,064 KB
最終ジャッジ日時 2024-06-28 13:09:37
合計ジャッジ時間 6,646 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        double rateCoffee = sc.nextDouble();
        double rateTea = sc.nextDouble();

        double coffee = sc.nextDouble();
        double tea = sc.nextDouble();

        double lovebirdTea = (rateCoffee + rateTea) * Math.min(coffee/rateCoffee, tea/rateTea);

        System.out.println(lovebirdTea);

    }

}
0