結果

問題 No.538 N.G.S.
ユーザー OlderInvestorOlderInvestor
提出日時 2017-10-08 17:07:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 453 bytes
コンパイル時間 3,312 ms
コンパイル使用メモリ 74,688 KB
実行使用メモリ 57,496 KB
最終ジャッジ日時 2023-10-25 05:01:21
合計ジャッジ時間 12,152 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
57,232 KB
testcase_01 AC 134 ms
57,336 KB
testcase_02 AC 133 ms
57,452 KB
testcase_03 AC 133 ms
57,356 KB
testcase_04 AC 132 ms
57,360 KB
testcase_05 AC 132 ms
57,216 KB
testcase_06 AC 134 ms
57,320 KB
testcase_07 AC 132 ms
57,332 KB
testcase_08 AC 132 ms
57,492 KB
testcase_09 AC 133 ms
57,360 KB
testcase_10 AC 135 ms
57,344 KB
testcase_11 AC 134 ms
57,280 KB
testcase_12 AC 132 ms
57,392 KB
testcase_13 AC 132 ms
57,236 KB
testcase_14 AC 134 ms
57,220 KB
testcase_15 AC 132 ms
57,272 KB
testcase_16 AC 132 ms
57,292 KB
testcase_17 AC 135 ms
57,256 KB
testcase_18 AC 134 ms
57,228 KB
testcase_19 AC 136 ms
57,392 KB
testcase_20 AC 137 ms
57,076 KB
testcase_21 AC 121 ms
56,132 KB
testcase_22 AC 131 ms
57,368 KB
testcase_23 AC 132 ms
57,292 KB
testcase_24 AC 134 ms
57,384 KB
testcase_25 AC 133 ms
57,176 KB
testcase_26 AC 132 ms
57,252 KB
testcase_27 AC 135 ms
57,268 KB
testcase_28 AC 132 ms
57,240 KB
testcase_29 AC 132 ms
57,332 KB
testcase_30 AC 135 ms
57,248 KB
testcase_31 AC 134 ms
57,112 KB
testcase_32 AC 131 ms
57,268 KB
testcase_33 AC 132 ms
57,268 KB
testcase_34 AC 132 ms
57,188 KB
testcase_35 AC 132 ms
56,960 KB
testcase_36 AC 135 ms
57,280 KB
testcase_37 AC 130 ms
55,256 KB
testcase_38 AC 132 ms
57,056 KB
testcase_39 AC 133 ms
57,264 KB
testcase_40 AC 129 ms
57,212 KB
testcase_41 AC 131 ms
56,976 KB
testcase_42 AC 132 ms
57,268 KB
testcase_43 AC 132 ms
57,496 KB
testcase_44 AC 132 ms
57,288 KB
testcase_45 AC 132 ms
57,300 KB
testcase_46 AC 131 ms
57,484 KB
testcase_47 AC 121 ms
56,092 KB
testcase_48 AC 134 ms
57,300 KB
testcase_49 AC 132 ms
57,280 KB
testcase_50 AC 129 ms
57,328 KB
testcase_51 AC 133 ms
57,280 KB
testcase_52 AC 138 ms
57,296 KB
testcase_53 AC 131 ms
57,300 KB
testcase_54 AC 131 ms
57,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class No538 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] b = {sc.nextInt(), sc.nextInt(), sc.nextInt()};
        double r, d, keisu;

        keisu = 1.0 / (b[1] - b[0]);
        r = keisu * b[2] + -keisu * b[1];
        d = keisu * -b[0] * b[2] + keisu * b[1] * b[1];

        System.out.println((long)Math.round(r * b[2] + d));
    }
}
0