結果
| 問題 |
No.419 直角三角形
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-08 10:12:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 371 bytes |
| コンパイル時間 | 1,311 ms |
| コンパイル使用メモリ | 164,388 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-18 21:05:11 |
| 合計ジャッジ時間 | 1,998 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 3 |
ソースコード
#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;
}
else 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;
}