結果
問題 |
No.1487 ぺんぎんさんかっけー
|
ユーザー |
![]() |
提出日時 | 2022-10-02 17:22:28 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 443 bytes |
コンパイル時間 | 1,109 ms |
コンパイル使用メモリ | 29,184 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 13:26:46 |
合計ジャッジ時間 | 2,258 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 37 |
ソースコード
#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; }