結果

問題 No.538 N.G.S.
ユーザー syuki791
提出日時 2017-07-02 00:48:16
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 480 bytes
コンパイル時間 4,058 ms
コンパイル使用メモリ 74,496 KB
実行使用メモリ 54,612 KB
最終ジャッジ日時 2024-10-05 03:15:32
合計ジャッジ時間 11,494 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	
	public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		
		String[] str = s.nextLine().split(" ");
		s.close();
		
		int b1 = Integer.parseInt(str[0]);
		
		int b2 = Integer.parseInt(str[1]);
		
		int b3 = Integer.parseInt(str[2]);
		
		
		double r = (double)(b3 - b2) / (double)(b2 - b1);
		double d = (double)(b2*b2-b1*b3)/(double)(b2-b1);
		double b4 = r*b3 + d;
		System.out.println((int)b4);
		
	}

}
0