結果

問題 No.538 N.G.S.
ユーザー syuki791syuki791
提出日時 2017-07-08 22:08:40
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 475 bytes
コンパイル時間 2,332 ms
コンパイル使用メモリ 74,208 KB
実行使用メモリ 54,712 KB
最終ジャッジ日時 2024-04-16 06:38:59
合計ジャッジ時間 11,215 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
54,244 KB
testcase_01 AC 136 ms
53,948 KB
testcase_02 AC 133 ms
54,320 KB
testcase_03 AC 133 ms
54,712 KB
testcase_04 AC 133 ms
53,936 KB
testcase_05 AC 138 ms
54,020 KB
testcase_06 AC 138 ms
53,844 KB
testcase_07 AC 133 ms
54,096 KB
testcase_08 AC 136 ms
54,088 KB
testcase_09 AC 132 ms
54,020 KB
testcase_10 AC 133 ms
53,700 KB
testcase_11 AC 136 ms
41,460 KB
testcase_12 AC 137 ms
40,960 KB
testcase_13 AC 139 ms
40,964 KB
testcase_14 AC 134 ms
41,372 KB
testcase_15 AC 134 ms
41,192 KB
testcase_16 AC 132 ms
41,516 KB
testcase_17 AC 136 ms
41,372 KB
testcase_18 AC 135 ms
41,332 KB
testcase_19 AC 137 ms
41,740 KB
testcase_20 AC 135 ms
40,932 KB
testcase_21 AC 138 ms
41,472 KB
testcase_22 AC 134 ms
41,636 KB
testcase_23 AC 136 ms
41,440 KB
testcase_24 AC 139 ms
41,500 KB
testcase_25 AC 134 ms
41,280 KB
testcase_26 AC 136 ms
41,200 KB
testcase_27 AC 135 ms
41,292 KB
testcase_28 AC 133 ms
41,136 KB
testcase_29 AC 133 ms
41,372 KB
testcase_30 AC 133 ms
41,520 KB
testcase_31 AC 137 ms
41,776 KB
testcase_32 AC 136 ms
41,448 KB
testcase_33 AC 131 ms
41,288 KB
testcase_34 AC 139 ms
40,940 KB
testcase_35 AC 134 ms
41,176 KB
testcase_36 AC 133 ms
41,388 KB
testcase_37 AC 135 ms
41,448 KB
testcase_38 AC 137 ms
41,404 KB
testcase_39 AC 134 ms
41,324 KB
testcase_40 AC 133 ms
41,228 KB
testcase_41 AC 136 ms
41,468 KB
testcase_42 AC 135 ms
41,240 KB
testcase_43 AC 133 ms
41,456 KB
testcase_44 AC 136 ms
41,064 KB
testcase_45 AC 136 ms
41,220 KB
testcase_46 AC 133 ms
41,380 KB
testcase_47 AC 135 ms
41,188 KB
testcase_48 AC 136 ms
41,368 KB
testcase_49 AC 135 ms
41,200 KB
testcase_50 WA -
testcase_51 AC 133 ms
41,364 KB
testcase_52 AC 136 ms
41,368 KB
testcase_53 WA -
testcase_54 AC 135 ms
41,128 KB
権限があれば一括ダウンロードができます

ソースコード

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();
		
		double b1 = Double.parseDouble(str[0]);
		
		double b2 = Double.parseDouble(str[1]);
		
		double b3 = Double.parseDouble(str[2]);
		
		
		double r = (b3 - b2) / (b2 - b1);
		double d = (b2*b2-b1*b3)/(b2-b1);
		double b4 = Math.ceil(r*b3 + d);
		System.out.println((long)b4);
		
	}

}
0