結果

問題 No.236 鴛鴦茶
ユーザー spaciaspacia
提出日時 2015-12-29 20:39:43
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 642 bytes
コンパイル時間 2,144 ms
コンパイル使用メモリ 74,628 KB
実行使用メモリ 53,684 KB
最終ジャッジ日時 2023-10-19 12:22:50
合計ジャッジ時間 4,416 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
53,564 KB
testcase_01 AC 50 ms
52,608 KB
testcase_02 AC 50 ms
52,560 KB
testcase_03 AC 50 ms
53,568 KB
testcase_04 AC 52 ms
53,600 KB
testcase_05 WA -
testcase_06 AC 52 ms
53,564 KB
testcase_07 AC 51 ms
53,600 KB
testcase_08 AC 51 ms
52,588 KB
testcase_09 AC 50 ms
52,540 KB
testcase_10 AC 53 ms
53,596 KB
testcase_11 AC 51 ms
53,604 KB
testcase_12 WA -
testcase_13 AC 50 ms
51,544 KB
testcase_14 WA -
testcase_15 AC 50 ms
53,612 KB
testcase_16 AC 51 ms
53,592 KB
testcase_17 AC 52 ms
53,592 KB
testcase_18 AC 51 ms
52,584 KB
testcase_19 AC 51 ms
53,596 KB
testcase_20 AC 52 ms
53,592 KB
testcase_21 AC 53 ms
53,560 KB
testcase_22 AC 51 ms
53,588 KB
testcase_23 AC 52 ms
53,592 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;
import java.math.*;

class Main236 {
	
	public static void out (Object out) {
		System.out.println(out);
	}
	
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		String[] line = br.readLine().split(" ");
		int a = Integer.parseInt(line[0]);
		int b = Integer.parseInt(line[1]);
		int x = Integer.parseInt(line[2]);
		int y = Integer.parseInt(line[3]);
		
		if (a < b) {
			out(y + ((double)y / b * a));
		} else if (b < a) {
			out(x + ((double)x / a * b));
		} else {
			out(Math.min(x , y) * 2);
		}
		
	}
}
0