結果

問題 No.236 鴛鴦茶
ユーザー 練習生練習生
提出日時 2015-08-06 19:03:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 467 bytes
コンパイル時間 4,268 ms
コンパイル使用メモリ 72,044 KB
実行使用メモリ 56,184 KB
最終ジャッジ日時 2023-09-10 21:52:35
合計ジャッジ時間 7,792 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,572 KB
testcase_01 AC 127 ms
55,920 KB
testcase_02 AC 126 ms
55,856 KB
testcase_03 AC 127 ms
56,004 KB
testcase_04 AC 127 ms
55,680 KB
testcase_05 AC 126 ms
55,628 KB
testcase_06 AC 126 ms
55,916 KB
testcase_07 AC 127 ms
55,884 KB
testcase_08 AC 126 ms
55,912 KB
testcase_09 AC 126 ms
55,684 KB
testcase_10 AC 127 ms
55,472 KB
testcase_11 AC 126 ms
55,868 KB
testcase_12 AC 126 ms
55,564 KB
testcase_13 AC 126 ms
55,780 KB
testcase_14 AC 125 ms
56,172 KB
testcase_15 AC 126 ms
55,668 KB
testcase_16 AC 126 ms
55,876 KB
testcase_17 AC 124 ms
55,556 KB
testcase_18 AC 123 ms
56,068 KB
testcase_19 AC 120 ms
55,928 KB
testcase_20 AC 123 ms
56,060 KB
testcase_21 AC 124 ms
55,920 KB
testcase_22 AC 125 ms
56,184 KB
testcase_23 AC 125 ms
55,808 KB
testcase_24 AC 125 ms
55,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No236 {
	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();
		sc.close();
		double work1, work2;
		work1 = (double)x * (a + b) / a;
		work2 = (double)y * (a + b) / b;
		double en_ou_tya;
		if(work1 > work2){
			en_ou_tya = work2;
		}else{
			en_ou_tya = work1;
		}
		System.out.println(en_ou_tya);
	}
}
0