結果

問題 No.538 N.G.S.
ユーザー tenten
提出日時 2021-02-08 12:02:50
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 386 bytes
コンパイル時間 2,602 ms
コンパイル使用メモリ 73,788 KB
実行使用メモリ 42,000 KB
最終ジャッジ日時 2024-07-05 08:20:17
合計ジャッジ時間 9,089 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 47 WA * 4
権限があれば一括ダウンロードができます

ソースコード

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)ans);
    }
}
0