結果

問題 No.236 鴛鴦茶
ユーザー marumaru
提出日時 2016-03-22 19:57:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 426 bytes
コンパイル時間 3,661 ms
コンパイル使用メモリ 72,208 KB
実行使用メモリ 57,532 KB
最終ジャッジ日時 2023-09-10 22:02:42
合計ジャッジ時間 7,525 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,588 KB
testcase_01 AC 124 ms
57,532 KB
testcase_02 AC 125 ms
55,420 KB
testcase_03 AC 126 ms
55,700 KB
testcase_04 AC 124 ms
55,420 KB
testcase_05 AC 125 ms
55,444 KB
testcase_06 AC 125 ms
56,120 KB
testcase_07 AC 124 ms
55,196 KB
testcase_08 AC 124 ms
55,924 KB
testcase_09 AC 124 ms
55,792 KB
testcase_10 AC 128 ms
55,664 KB
testcase_11 AC 124 ms
55,696 KB
testcase_12 AC 125 ms
55,652 KB
testcase_13 AC 124 ms
55,588 KB
testcase_14 AC 125 ms
55,520 KB
testcase_15 AC 125 ms
55,520 KB
testcase_16 AC 124 ms
55,820 KB
testcase_17 AC 124 ms
55,292 KB
testcase_18 AC 124 ms
55,768 KB
testcase_19 AC 125 ms
55,812 KB
testcase_20 AC 124 ms
55,572 KB
testcase_21 AC 124 ms
55,788 KB
testcase_22 AC 126 ms
55,880 KB
testcase_23 AC 126 ms
55,432 KB
testcase_24 AC 126 ms
55,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class yukicoder_236 {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int a = stdIn.nextInt();
		int b = stdIn.nextInt();
		int x = stdIn.nextInt();
		int y = stdIn.nextInt();
		
		double ax = (double)x / a;
		double by = (double)y / b;
		
		if (ax >= by) {
			System.out.println((a + b) * by);
		} else {
			System.out.println((a + b) * ax);
		}
	}
}
0