結果

問題 No.1487 ぺんぎんさんかっけー
ユーザー ks2m
提出日時 2021-04-23 21:32:29
言語 Java
(openjdk 23)
結果
AC  
実行時間 135 ms / 1,000 ms
コード長 355 bytes
コンパイル時間 2,634 ms
コンパイル使用メモリ 74,276 KB
実行使用メモリ 54,468 KB
最終ジャッジ日時 2024-07-04 07:41:13
合計ジャッジ時間 7,967 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		sc.close();

		double s = (a + b + c) / 2.0;
		double x = Math.sqrt(s * (s - a) * (s - b) * (s - c));
		System.out.println(x / 4);
	}
}
0