結果

問題 No.306 さいたま2008
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-28 12:09:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 2,134 ms
コンパイル使用メモリ 70,860 KB
実行使用メモリ 55,940 KB
最終ジャッジ日時 2023-08-18 08:42:47
合計ジャッジ時間 5,933 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,880 KB
testcase_01 AC 124 ms
55,612 KB
testcase_02 AC 126 ms
55,584 KB
testcase_03 AC 126 ms
55,764 KB
testcase_04 AC 126 ms
55,752 KB
testcase_05 AC 126 ms
55,576 KB
testcase_06 AC 124 ms
55,628 KB
testcase_07 AC 125 ms
53,772 KB
testcase_08 AC 126 ms
55,876 KB
testcase_09 AC 124 ms
55,680 KB
testcase_10 AC 128 ms
55,656 KB
testcase_11 AC 125 ms
55,940 KB
testcase_12 AC 127 ms
55,692 KB
testcase_13 AC 126 ms
55,796 KB
testcase_14 AC 127 ms
55,616 KB
testcase_15 AC 128 ms
55,788 KB
testcase_16 AC 126 ms
55,432 KB
testcase_17 AC 126 ms
55,432 KB
testcase_18 AC 129 ms
55,684 KB
testcase_19 AC 129 ms
55,676 KB
testcase_20 AC 128 ms
55,768 KB
testcase_21 AC 123 ms
55,748 KB
testcase_22 AC 126 ms
55,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int xa = sc.nextInt();
        int ya = sc.nextInt();
        int xb = sc.nextInt();
        int yb = sc.nextInt();
        double ans = ya+(double)(yb-ya)/(xb+xa)*xa;
        System.out.println(ans);
    }
}
0