結果

問題 No.236 鴛鴦茶
ユーザー shinwisteriashinwisteria
提出日時 2018-03-14 21:29:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 2,000 ms
コード長 368 bytes
コンパイル時間 3,029 ms
コンパイル使用メモリ 71,888 KB
実行使用メモリ 56,568 KB
最終ジャッジ日時 2023-09-10 22:15:49
合計ジャッジ時間 7,605 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
55,936 KB
testcase_01 AC 134 ms
56,028 KB
testcase_02 AC 134 ms
56,212 KB
testcase_03 AC 133 ms
55,712 KB
testcase_04 AC 134 ms
55,712 KB
testcase_05 AC 133 ms
55,804 KB
testcase_06 AC 135 ms
55,576 KB
testcase_07 AC 134 ms
56,568 KB
testcase_08 AC 137 ms
56,180 KB
testcase_09 AC 131 ms
55,880 KB
testcase_10 AC 134 ms
55,948 KB
testcase_11 AC 136 ms
55,944 KB
testcase_12 AC 135 ms
55,700 KB
testcase_13 AC 136 ms
55,616 KB
testcase_14 AC 137 ms
55,808 KB
testcase_15 AC 135 ms
56,008 KB
testcase_16 AC 134 ms
55,532 KB
testcase_17 AC 135 ms
56,036 KB
testcase_18 AC 135 ms
55,572 KB
testcase_19 AC 134 ms
55,956 KB
testcase_20 AC 135 ms
55,800 KB
testcase_21 AC 135 ms
55,984 KB
testcase_22 AC 134 ms
55,952 KB
testcase_23 AC 134 ms
55,704 KB
testcase_24 AC 134 ms
55,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con236 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		double a = s.nextDouble() , b = s.nextDouble() ,x = s.nextDouble() , y = s.nextDouble();
		s.close();

		if(x / a * b >= y){
			System.out.println(y + y * a / b);
		}else{
			System.out.println(x + x * b / a);
		}

	}

}
0