結果

問題 No.236 鴛鴦茶
ユーザー 37zigen37zigen
提出日時 2016-03-29 17:36:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 143 ms / 2,000 ms
コード長 372 bytes
コンパイル時間 2,754 ms
コンパイル使用メモリ 71,364 KB
実行使用メモリ 56,076 KB
最終ジャッジ日時 2023-09-10 22:03:04
合計ジャッジ時間 6,554 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
55,424 KB
testcase_01 AC 137 ms
55,988 KB
testcase_02 AC 137 ms
55,468 KB
testcase_03 AC 137 ms
56,076 KB
testcase_04 AC 140 ms
55,676 KB
testcase_05 AC 136 ms
55,828 KB
testcase_06 AC 139 ms
55,716 KB
testcase_07 AC 138 ms
55,516 KB
testcase_08 AC 138 ms
56,060 KB
testcase_09 AC 140 ms
55,764 KB
testcase_10 AC 140 ms
55,624 KB
testcase_11 AC 137 ms
55,808 KB
testcase_12 AC 141 ms
55,800 KB
testcase_13 AC 142 ms
55,680 KB
testcase_14 AC 139 ms
55,952 KB
testcase_15 AC 140 ms
55,424 KB
testcase_16 AC 139 ms
55,884 KB
testcase_17 AC 140 ms
55,924 KB
testcase_18 AC 137 ms
55,848 KB
testcase_19 AC 143 ms
55,732 KB
testcase_20 AC 138 ms
55,828 KB
testcase_21 AC 139 ms
55,972 KB
testcase_22 AC 138 ms
55,556 KB
testcase_23 AC 137 ms
53,456 KB
testcase_24 AC 138 ms
55,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder236;
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		double a=sc.nextDouble();
		double b=sc.nextDouble();
		double x=sc.nextDouble();
		double y=sc.nextDouble();
		if(x*b>=y*a){
			System.out.println(y+(y/b)*a);
		}else if(x*b<y*a){
			System.out.println(x+(x/a)*b);
		}
	}
}
0