結果
| 問題 |
No.419 直角三角形
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-03 23:11:33 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 264 bytes |
| コンパイル時間 | 209 ms |
| コンパイル使用メモリ | 29,952 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 00:53:30 |
| 合計ジャッジ時間 | 913 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 20 |
ソースコード
#include <stdio.h>
#include <math.h>
int main(void)
{
double a, b, c, d;
scanf("%lf%lf", &a, &b);
c = a * a - b * b;
d = b * b - a * a;
printf("%.7f\n", a != b ? sqrt(c) < sqrt(d) ? sqrt(fabs(c)) : sqrt(fabs(d)) : sqrtl(a*b + a * b));
return 0;
}