結果
| 問題 |
No.419 直角三角形
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-08 10:11:12 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 366 bytes |
| コンパイル時間 | 1,517 ms |
| コンパイル使用メモリ | 166,408 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-18 21:03:54 |
| 合計ジャッジ時間 | 2,505 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 11 WA * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
double a, b;
cin >> a >> b;
double l, s;
if (a > b)
{
s = b;
l = a;
}
if (a < b)
{
s = a;
l = b;
}
else
{
cout << sqrtf64(2) * a;
return 0;
}
double ans = sqrtf64(pow(l, 2) - pow(s, 2));
cout << ans;
}