結果

問題 No.236 鴛鴦茶
ユーザー Taka
提出日時 2016-04-05 16:35:45
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 399 bytes
コンパイル時間 1,860 ms
コンパイル使用メモリ 73,768 KB
実行使用メモリ 56,200 KB
最終ジャッジ日時 2024-10-04 01:20:19
合計ジャッジ時間 5,905 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 8 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
		
        Scanner sc = new Scanner(System.in);
		
       	int A = sc.nextInt();
        int B = sc.nextInt();
		int X = sc.nextInt();
        int Y = sc.nextInt();
		
		double max=0;
		
		if(A*Y<=B*X){
			max=Y*(A+B)/B;
		}else if(A*Y>B*X){
			max=X*(A+B)/A;
		}
		
        System.out.println(max);
    }
}
0