結果

問題 No.735 接線
ユーザー Grenache
提出日時 2019-04-26 21:07:58
言語 Java
(openjdk 23)
結果
AC  
実行時間 149 ms / 2,000 ms
コード長 592 bytes
コンパイル時間 3,371 ms
コンパイル使用メモリ 74,716 KB
実行使用メモリ 54,504 KB
最終ジャッジ日時 2024-11-25 01:10:02
合計ジャッジ時間 8,570 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

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