結果

問題 No.236 鴛鴦茶
ユーザー TakaTaka
提出日時 2016-04-05 16:35:45
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 399 bytes
コンパイル時間 2,200 ms
コンパイル使用メモリ 73,968 KB
実行使用メモリ 56,048 KB
最終ジャッジ日時 2024-04-14 21:42:32
合計ジャッジ時間 6,434 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
54,240 KB
testcase_01 AC 128 ms
54,272 KB
testcase_02 AC 128 ms
53,984 KB
testcase_03 AC 127 ms
54,144 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 126 ms
54,024 KB
testcase_07 WA -
testcase_08 AC 129 ms
53,908 KB
testcase_09 AC 126 ms
54,256 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 126 ms
54,084 KB
testcase_21 AC 132 ms
54,148 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

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