結果
| 問題 | 
                            No.419 直角三角形
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-05-03 23:09:32 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 264 bytes | 
| コンパイル時間 | 193 ms | 
| コンパイル使用メモリ | 30,336 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-28 00:53:27 | 
| 合計ジャッジ時間 | 988 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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", sqrt(c) < sqrt(d) ? a != b ? sqrt(fabs(c)) : sqrt(fabs(d)) : sqrtl(a*b + a * b));
	return 0;
}