結果

問題 No.735 接線
ユーザー 37zigen37zigen
提出日時 2018-09-28 21:55:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 467 bytes
コンパイル時間 2,086 ms
コンパイル使用メモリ 75,000 KB
実行使用メモリ 54,548 KB
最終ジャッジ日時 2024-04-20 10:43:36
合計ジャッジ時間 6,617 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
53,392 KB
testcase_01 AC 130 ms
54,348 KB
testcase_02 AC 126 ms
54,216 KB
testcase_03 AC 125 ms
53,572 KB
testcase_04 AC 125 ms
53,640 KB
testcase_05 AC 120 ms
53,928 KB
testcase_06 AC 123 ms
54,244 KB
testcase_07 AC 113 ms
53,812 KB
testcase_08 AC 123 ms
53,736 KB
testcase_09 AC 128 ms
54,296 KB
testcase_10 AC 121 ms
54,036 KB
testcase_11 AC 127 ms
54,324 KB
testcase_12 AC 117 ms
53,560 KB
testcase_13 AC 139 ms
54,420 KB
testcase_14 AC 121 ms
54,072 KB
testcase_15 AC 127 ms
54,332 KB
testcase_16 AC 126 ms
54,376 KB
testcase_17 AC 119 ms
54,096 KB
testcase_18 AC 122 ms
54,080 KB
testcase_19 AC 105 ms
53,444 KB
testcase_20 AC 110 ms
53,724 KB
testcase_21 AC 120 ms
54,260 KB
testcase_22 AC 120 ms
54,188 KB
testcase_23 AC 123 ms
54,344 KB
testcase_24 AC 125 ms
54,188 KB
testcase_25 AC 122 ms
53,472 KB
testcase_26 AC 113 ms
53,660 KB
testcase_27 AC 123 ms
54,548 KB
testcase_28 AC 123 ms
54,124 KB
testcase_29 AC 120 ms
53,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		new Main().run();
	}

	final long MOD = (long) (1e9 + 7);

	public void run() throws Exception {
		Scanner sc = new Scanner(System.in);
		double r = sc.nextDouble();
		double d = sc.nextDouble();
		System.out.println(Math.sqrt(d * d - r * r));
	}

	void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}
}
0