結果

問題 No.236 鴛鴦茶
ユーザー yun_appyun_app
提出日時 2016-05-12 00:20:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 46 ms / 2,000 ms
コード長 633 bytes
コンパイル時間 2,142 ms
コンパイル使用メモリ 71,928 KB
実行使用メモリ 49,708 KB
最終ジャッジ日時 2023-09-10 22:04:07
合計ジャッジ時間 4,387 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
49,432 KB
testcase_01 AC 46 ms
49,436 KB
testcase_02 AC 45 ms
49,500 KB
testcase_03 AC 45 ms
47,368 KB
testcase_04 AC 45 ms
49,348 KB
testcase_05 AC 45 ms
49,604 KB
testcase_06 AC 45 ms
49,392 KB
testcase_07 AC 46 ms
49,432 KB
testcase_08 AC 44 ms
49,568 KB
testcase_09 AC 46 ms
49,572 KB
testcase_10 AC 45 ms
49,540 KB
testcase_11 AC 45 ms
49,428 KB
testcase_12 AC 46 ms
47,428 KB
testcase_13 AC 45 ms
49,432 KB
testcase_14 AC 44 ms
49,456 KB
testcase_15 AC 45 ms
49,508 KB
testcase_16 AC 46 ms
49,440 KB
testcase_17 AC 45 ms
49,332 KB
testcase_18 AC 45 ms
49,432 KB
testcase_19 AC 45 ms
49,708 KB
testcase_20 AC 46 ms
49,420 KB
testcase_21 AC 45 ms
49,352 KB
testcase_22 AC 46 ms
49,500 KB
testcase_23 AC 45 ms
49,524 KB
testcase_24 AC 45 ms
49,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.lang.*;
import java.io.*;

class Ideone{
    public static void main(String[] args) throws Exception{
        // your code goes here
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] lines = br.readLine().split(" ");
        float a = Float.parseFloat(lines[0]);
        float b = Float.parseFloat(lines[1]);
        float x = Float.parseFloat(lines[2]);
        float y = Float.parseFloat(lines[3]);
        
        if(a*y > b*x){
            System.out.println(x + x*b/a);
        }else{
            System.out.println(y + y*a/b);
        }
    }
}
0