結果
問題 | No.735 接線 |
ユーザー |
|
提出日時 | 2021-09-01 01:14:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 574 bytes |
コンパイル時間 | 1,447 ms |
コンパイル使用メモリ | 167,204 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-26 13:23:43 |
合計ジャッジ時間 | 2,431 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #define all(A) A.begin(),A.end() using vll = vector<ll>; #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) using Graph = vector<vector<ll>>; ll mod = 1e9 + 7; ll inv(ll N) { ll a = N, b = mod, c = 1, d = 0; while (b > 0) { ll t = a / b; a -= t * b; swap(a, b); c -= t * d; swap(c, d); } c %= mod; if (c < 0)c += mod; return c; } int main() { double r,d; cin>>r>>d; cout<<setprecision(16)<<sqrt(d*d-r*r)<<endl; }