結果
| 問題 |
No.419 直角三角形
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 20:16:29 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 292 bytes |
| コンパイル時間 | 1,710 ms |
| コンパイル使用メモリ | 194,068 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-20 20:17:09 |
| 合計ジャッジ時間 | 2,502 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0)->sync_with_stdio(0);
int n, m;
cin >> n >> m;
cout << fixed << setprecision(15);
if (n == m) {
cout << sqrt(2) * n << endl;
} else {
if (n > m) swap(n, m);
cout << sqrt(m * m - n * n) << endl;
}
}
lam6er