結果

問題 No.538 N.G.S.
ユーザー tentententen
提出日時 2021-02-08 12:05:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 400 bytes
コンパイル時間 1,957 ms
コンパイル使用メモリ 71,400 KB
実行使用メモリ 57,128 KB
最終ジャッジ日時 2023-09-18 18:34:50
合計ジャッジ時間 10,790 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,744 KB
testcase_01 AC 126 ms
55,344 KB
testcase_02 AC 127 ms
55,444 KB
testcase_03 AC 128 ms
55,504 KB
testcase_04 AC 129 ms
55,464 KB
testcase_05 AC 126 ms
56,084 KB
testcase_06 AC 126 ms
55,740 KB
testcase_07 AC 127 ms
53,676 KB
testcase_08 AC 127 ms
55,520 KB
testcase_09 AC 126 ms
55,748 KB
testcase_10 AC 127 ms
55,596 KB
testcase_11 AC 127 ms
55,584 KB
testcase_12 AC 128 ms
55,732 KB
testcase_13 AC 127 ms
55,760 KB
testcase_14 AC 126 ms
55,644 KB
testcase_15 AC 126 ms
55,416 KB
testcase_16 AC 126 ms
55,564 KB
testcase_17 AC 127 ms
53,896 KB
testcase_18 AC 127 ms
55,600 KB
testcase_19 AC 126 ms
56,068 KB
testcase_20 AC 127 ms
57,128 KB
testcase_21 AC 127 ms
55,712 KB
testcase_22 AC 126 ms
53,588 KB
testcase_23 AC 128 ms
55,716 KB
testcase_24 AC 125 ms
55,808 KB
testcase_25 AC 126 ms
53,644 KB
testcase_26 AC 126 ms
55,732 KB
testcase_27 AC 126 ms
55,920 KB
testcase_28 AC 126 ms
55,712 KB
testcase_29 AC 126 ms
55,536 KB
testcase_30 AC 125 ms
55,712 KB
testcase_31 AC 126 ms
55,784 KB
testcase_32 AC 127 ms
55,848 KB
testcase_33 AC 126 ms
55,720 KB
testcase_34 AC 124 ms
55,856 KB
testcase_35 AC 126 ms
55,492 KB
testcase_36 AC 125 ms
55,868 KB
testcase_37 AC 124 ms
55,860 KB
testcase_38 AC 124 ms
55,432 KB
testcase_39 AC 124 ms
55,352 KB
testcase_40 AC 125 ms
55,512 KB
testcase_41 AC 125 ms
55,656 KB
testcase_42 AC 124 ms
55,744 KB
testcase_43 AC 125 ms
55,656 KB
testcase_44 AC 124 ms
55,704 KB
testcase_45 AC 124 ms
55,836 KB
testcase_46 AC 125 ms
55,864 KB
testcase_47 AC 124 ms
55,500 KB
testcase_48 AC 126 ms
55,668 KB
testcase_49 AC 126 ms
55,496 KB
testcase_50 AC 126 ms
55,712 KB
testcase_51 AC 127 ms
55,740 KB
testcase_52 AC 127 ms
55,596 KB
testcase_53 AC 126 ms
55,516 KB
testcase_54 AC 126 ms
55,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double b1 = sc.nextInt();
        double b2 = sc.nextInt();
        double b3 = sc.nextInt();
        double r = (b2 - b3) / (b1 - b2);
        double d = b2 - b1 * r;
        double ans = r * b3 + d;
        System.out.println((long)(Math.round(ans)));
    }
}
0