結果
問題 | No.419 直角三角形 |
ユーザー |
|
提出日時 | 2019-08-16 18:19:48 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 221 bytes |
コンパイル時間 | 2,142 ms |
コンパイル使用メモリ | 193,624 KB |
最終ジャッジ日時 | 2025-01-07 12:06:22 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;int main() {int a,b;cin>>a>>b;cout<<fixed;if (a==b) cout<<hypot(a,b)<<endl;else cout<<sqrt(abs(a*a-b*b))<<endl;return 0;}