0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-30 20:36:26 +00:00

B - Get Closer

https://atcoder.jp/contests/abc246/submissions/30633472
This commit is contained in:
Baoshuo Ren 2022-04-02 20:09:37 +08:00
parent c00899f864
commit c1db271f6b
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

21
AtCoder/ABC246/B/B.cpp Normal file
View File

@ -0,0 +1,21 @@
#include <cmath>
#include <iomanip>
#include <iostream>
using std::cin;
using std::cout;
const char endl = '\n';
int a, b;
double c;
int main() {
std::ios::sync_with_stdio(false);
cin >> a >> b;
c = std::sqrt(std::pow(a, 2) + std::pow(b, 2));
cout << std::fixed << std::setprecision(12) << 1.0 * a / c << ' ' << std::fixed << std::setprecision(12) << 1.0 * b / c << endl;
return 0;
}