結果

問題 No.538 N.G.S.
ユーザー tentententen
提出日時 2020-11-18 09:59:51
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 375 bytes
コンパイル時間 2,149 ms
コンパイル使用メモリ 74,256 KB
実行使用メモリ 56,220 KB
最終ジャッジ日時 2024-07-23 08:52:52
合計ジャッジ時間 10,952 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 15 WA * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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