結果

問題 No.735 接線
ユーザー GrenacheGrenache
提出日時 2019-04-26 21:07:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 592 bytes
コンパイル時間 5,004 ms
コンパイル使用メモリ 72,412 KB
実行使用メモリ 58,436 KB
最終ジャッジ日時 2023-08-16 12:23:54
合計ジャッジ時間 11,101 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
56,472 KB
testcase_01 AC 141 ms
56,300 KB
testcase_02 AC 140 ms
58,436 KB
testcase_03 AC 137 ms
56,268 KB
testcase_04 AC 135 ms
57,736 KB
testcase_05 AC 137 ms
56,140 KB
testcase_06 AC 139 ms
56,428 KB
testcase_07 AC 137 ms
56,832 KB
testcase_08 AC 135 ms
56,084 KB
testcase_09 AC 137 ms
53,816 KB
testcase_10 AC 137 ms
56,040 KB
testcase_11 AC 136 ms
56,044 KB
testcase_12 AC 135 ms
56,304 KB
testcase_13 AC 137 ms
56,540 KB
testcase_14 AC 136 ms
55,928 KB
testcase_15 AC 138 ms
56,100 KB
testcase_16 AC 137 ms
56,024 KB
testcase_17 AC 138 ms
56,104 KB
testcase_18 AC 137 ms
55,900 KB
testcase_19 AC 138 ms
56,720 KB
testcase_20 AC 139 ms
56,300 KB
testcase_21 AC 137 ms
56,292 KB
testcase_22 AC 138 ms
56,060 KB
testcase_23 AC 139 ms
56,396 KB
testcase_24 AC 139 ms
56,468 KB
testcase_25 AC 138 ms
56,092 KB
testcase_26 AC 137 ms
56,060 KB
testcase_27 AC 138 ms
56,224 KB
testcase_28 AC 139 ms
56,364 KB
testcase_29 AC 139 ms
56,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.Scanner;


public class Main_yukicoder735 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		double r = sc.nextDouble();
		double d = sc.nextDouble();

		pr.printf("%.7f%n", Math.sqrt(d * d - r * r));
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
0