結果
| 問題 |
No.419 直角三角形
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2019-03-22 11:47:10 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 347 bytes |
| コンパイル時間 | 791 ms |
| コンパイル使用メモリ | 71,272 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-19 02:21:24 |
| 合計ジャッジ時間 | 1,693 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 3 |
ソースコード
#include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
int main()
{
int a, b;
std::cin >> a >> b;
double c = a < b ? std::sqrt(b * b - a * a) : std::sqrt(a * a - b * b);
std::cout << std::fixed << std::setprecision(6) << c << std::endl;
return 0;
}