結果

問題 No.538 N.G.S.
ユーザー tentententen
提出日時 2020-09-10 08:33:24
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 362 bytes
コンパイル時間 2,721 ms
コンパイル使用メモリ 74,668 KB
実行使用メモリ 41,588 KB
最終ジャッジ日時 2024-12-21 14:46:13
合計ジャッジ時間 10,954 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 49 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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