結果

問題 No.236 鴛鴦茶
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 19:21:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 2,147 ms
コンパイル使用メモリ 71,988 KB
実行使用メモリ 56,344 KB
最終ジャッジ日時 2023-09-10 22:08:27
合計ジャッジ時間 6,305 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,616 KB
testcase_01 AC 129 ms
55,624 KB
testcase_02 AC 124 ms
55,596 KB
testcase_03 AC 122 ms
55,604 KB
testcase_04 AC 122 ms
55,756 KB
testcase_05 AC 122 ms
55,624 KB
testcase_06 AC 122 ms
55,616 KB
testcase_07 AC 121 ms
55,808 KB
testcase_08 AC 121 ms
55,628 KB
testcase_09 AC 121 ms
55,604 KB
testcase_10 AC 120 ms
55,796 KB
testcase_11 AC 120 ms
55,584 KB
testcase_12 AC 121 ms
56,024 KB
testcase_13 AC 120 ms
56,344 KB
testcase_14 AC 120 ms
56,024 KB
testcase_15 AC 120 ms
56,056 KB
testcase_16 AC 120 ms
55,760 KB
testcase_17 AC 121 ms
55,916 KB
testcase_18 AC 122 ms
55,600 KB
testcase_19 AC 122 ms
55,716 KB
testcase_20 AC 122 ms
55,952 KB
testcase_21 AC 121 ms
55,560 KB
testcase_22 AC 121 ms
55,884 KB
testcase_23 AC 125 ms
56,232 KB
testcase_24 AC 120 ms
55,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    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();
        double c = (double)X/A;
        double d = (double)Y/B;
        double e = Math.min(c,d);
        double r = e*(A+B);
        System.out.println(r);
    }
}
0