結果

問題 No.1487 ぺんぎんさんかっけー
コンテスト
ユーザー pengin_2000
提出日時 2022-10-02 17:22:28
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 443 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 130 ms
コンパイル使用メモリ 39,012 KB
最終ジャッジ日時 2026-02-22 09:36:38
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<stdio.h>
double sqrt(double x)
{
	double min, mid, max;
	min = 0;
	max = 1;
	while (max * max <= x)
		max *= 2;
	int i;
	for (i = 0; i < 100; i++)
	{
		mid = (max + min) / 2;
		if (mid * mid > x)
			max = mid;
		else
			min = mid;
	}
	return min;
}
int main()
{
	double a, b, c;
	scanf("%lf %lf %lf", &a, &b, &c);
	double s = (a + b + c) / 2;
	double S = sqrt(s * (s - a) * (s - b) * (s - c));
	printf("%.20lf\n", S / 4);
	return 0;
}
0