結果

問題 No.236 鴛鴦茶
ユーザー tsunabittsunabit
提出日時 2019-05-26 17:16:09
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 629 bytes
コンパイル時間 4,294 ms
コンパイル使用メモリ 74,620 KB
実行使用メモリ 57,668 KB
最終ジャッジ日時 2023-10-17 17:57:12
合計ジャッジ時間 8,267 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
57,508 KB
testcase_01 AC 133 ms
57,432 KB
testcase_02 AC 132 ms
57,576 KB
testcase_03 AC 130 ms
57,104 KB
testcase_04 WA -
testcase_05 AC 131 ms
57,400 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 134 ms
57,528 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 130 ms
57,544 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayList;
import java.util.Scanner;
import java.util.Collections;

public class No236 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        int x = s.nextInt();
        int y = s.nextInt();
        double tempx = (a * y) / b;
        double tempy = (b * x) / a;
        
        if(x >= y && tempy <= y) {
        	System.out.println(x + tempy);
        }else {
        	System.out.println(tempx + y);
        }
    }
}
0