結果
| 問題 |
No.3151 natural math of inscribed circle
|
| コンテスト | |
| ユーザー |
pengin_2000
|
| 提出日時 | 2025-05-20 21:26:01 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 249 bytes |
| コンパイル時間 | 952 ms |
| コンパイル使用メモリ | 27,648 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2025-06-20 02:57:57 |
| 合計ジャッジ時間 | 1,908 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 41 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%lf %lf %lf", &a, &b, &c);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<math.h>
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));
double r = 2 * S / (a + b + c);
printf("%.20lf\n", r);
return 0;
}
pengin_2000