2 条题解
-
0
题解思路
利用相似三角形即可
#include<bits/stdc++.h> using namespace std; int a,b; double DIS(int a,int b){ return sqrt(a*a+b*b); } signed main(){ ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); cin>>a>>b; double dis=DIS(a,b); double _=1/dis; printf("%.12lf %.12lf\n",1.0*a*_,1.0*b*_); return 0; }
信息
- ID
- 12438
- 时间
- 2000ms
- 内存
- 1024MiB
- 难度
- 6
- 标签
- 递交数
- 24
- 已通过
- 12
- 上传者