結果

問題 No.306 さいたま2008
ユーザー htensaihtensai
提出日時 2019-12-18 11:54:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 600 bytes
コンパイル時間 3,627 ms
コンパイル使用メモリ 70,520 KB
実行使用メモリ 49,556 KB
最終ジャッジ日時 2023-09-20 08:35:28
合計ジャッジ時間 5,822 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
49,344 KB
testcase_01 AC 45 ms
49,176 KB
testcase_02 AC 47 ms
49,404 KB
testcase_03 AC 47 ms
49,116 KB
testcase_04 AC 46 ms
49,104 KB
testcase_05 AC 48 ms
49,248 KB
testcase_06 AC 46 ms
49,556 KB
testcase_07 AC 47 ms
49,188 KB
testcase_08 AC 45 ms
49,268 KB
testcase_09 AC 45 ms
49,124 KB
testcase_10 AC 45 ms
49,188 KB
testcase_11 AC 46 ms
49,172 KB
testcase_12 AC 47 ms
49,356 KB
testcase_13 AC 46 ms
49,420 KB
testcase_14 AC 45 ms
49,316 KB
testcase_15 AC 47 ms
49,124 KB
testcase_16 AC 47 ms
49,372 KB
testcase_17 AC 46 ms
49,268 KB
testcase_18 AC 47 ms
49,128 KB
testcase_19 AC 46 ms
49,272 KB
testcase_20 AC 46 ms
49,324 KB
testcase_21 AC 46 ms
49,396 KB
testcase_22 AC 46 ms
49,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] first = br.readLine().split(" ", 2);
        double xa = Integer.parseInt(first[0]);
        double ya = Integer.parseInt(first[1]);
        String[] second = br.readLine().split(" ", 2);
        double xb = Integer.parseInt(second[0]);
        double yb = Integer.parseInt(second[1]);
        double ans = ya + xa / (xa + xb) * (yb - ya);
        System.out.println(ans);
    }
}
0