結果

問題 No.735 接線
ユーザー 37zigen37zigen
提出日時 2018-09-28 21:55:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 145 ms / 2,000 ms
コード長 467 bytes
コンパイル時間 2,163 ms
コンパイル使用メモリ 72,420 KB
実行使用メモリ 57,880 KB
最終ジャッジ日時 2023-08-02 11:19:34
合計ジャッジ時間 7,605 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,752 KB
testcase_01 AC 125 ms
56,296 KB
testcase_02 AC 124 ms
56,180 KB
testcase_03 AC 130 ms
56,024 KB
testcase_04 AC 126 ms
56,232 KB
testcase_05 AC 139 ms
55,780 KB
testcase_06 AC 139 ms
57,880 KB
testcase_07 AC 125 ms
56,384 KB
testcase_08 AC 125 ms
55,984 KB
testcase_09 AC 126 ms
56,012 KB
testcase_10 AC 126 ms
55,920 KB
testcase_11 AC 127 ms
55,720 KB
testcase_12 AC 129 ms
56,224 KB
testcase_13 AC 128 ms
54,456 KB
testcase_14 AC 127 ms
56,012 KB
testcase_15 AC 129 ms
56,656 KB
testcase_16 AC 129 ms
56,012 KB
testcase_17 AC 130 ms
55,944 KB
testcase_18 AC 135 ms
56,496 KB
testcase_19 AC 135 ms
55,856 KB
testcase_20 AC 136 ms
55,904 KB
testcase_21 AC 130 ms
56,312 KB
testcase_22 AC 132 ms
56,136 KB
testcase_23 AC 131 ms
56,284 KB
testcase_24 AC 130 ms
56,160 KB
testcase_25 AC 134 ms
54,360 KB
testcase_26 AC 130 ms
56,340 KB
testcase_27 AC 140 ms
55,812 KB
testcase_28 AC 145 ms
55,804 KB
testcase_29 AC 127 ms
54,224 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