結果

問題 No.538 N.G.S.
ユーザー tentententen
提出日時 2021-02-08 12:17:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 340 bytes
コンパイル時間 2,862 ms
コンパイル使用メモリ 71,240 KB
実行使用メモリ 56,564 KB
最終ジャッジ日時 2023-09-18 18:45:33
合計ジャッジ時間 12,024 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,796 KB
testcase_01 AC 125 ms
56,008 KB
testcase_02 AC 125 ms
55,776 KB
testcase_03 AC 123 ms
55,768 KB
testcase_04 AC 126 ms
56,188 KB
testcase_05 AC 127 ms
55,640 KB
testcase_06 AC 125 ms
56,024 KB
testcase_07 AC 127 ms
56,564 KB
testcase_08 AC 128 ms
55,744 KB
testcase_09 AC 125 ms
55,660 KB
testcase_10 AC 123 ms
56,020 KB
testcase_11 AC 128 ms
55,876 KB
testcase_12 AC 125 ms
55,736 KB
testcase_13 AC 125 ms
56,128 KB
testcase_14 AC 125 ms
55,872 KB
testcase_15 AC 127 ms
55,672 KB
testcase_16 AC 125 ms
55,940 KB
testcase_17 AC 126 ms
55,516 KB
testcase_18 AC 126 ms
55,744 KB
testcase_19 AC 127 ms
55,684 KB
testcase_20 AC 125 ms
56,028 KB
testcase_21 AC 125 ms
55,844 KB
testcase_22 AC 124 ms
55,864 KB
testcase_23 AC 124 ms
53,864 KB
testcase_24 AC 124 ms
55,924 KB
testcase_25 AC 126 ms
56,028 KB
testcase_26 AC 124 ms
55,932 KB
testcase_27 AC 125 ms
56,156 KB
testcase_28 AC 124 ms
55,856 KB
testcase_29 AC 124 ms
55,928 KB
testcase_30 AC 125 ms
55,804 KB
testcase_31 AC 125 ms
56,064 KB
testcase_32 AC 125 ms
56,052 KB
testcase_33 AC 124 ms
55,916 KB
testcase_34 AC 126 ms
55,828 KB
testcase_35 AC 125 ms
55,848 KB
testcase_36 AC 125 ms
55,960 KB
testcase_37 AC 124 ms
55,856 KB
testcase_38 AC 124 ms
55,448 KB
testcase_39 AC 124 ms
55,836 KB
testcase_40 AC 124 ms
55,504 KB
testcase_41 AC 124 ms
55,868 KB
testcase_42 AC 124 ms
55,900 KB
testcase_43 AC 125 ms
55,876 KB
testcase_44 AC 125 ms
55,540 KB
testcase_45 AC 125 ms
55,792 KB
testcase_46 AC 126 ms
55,788 KB
testcase_47 AC 126 ms
56,000 KB
testcase_48 AC 124 ms
53,776 KB
testcase_49 AC 125 ms
55,868 KB
testcase_50 AC 123 ms
55,808 KB
testcase_51 AC 124 ms
55,804 KB
testcase_52 AC 125 ms
56,296 KB
testcase_53 AC 123 ms
55,992 KB
testcase_54 AC 123 ms
55,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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