题目传送门
没什么好说的,按照公式输出就行了,注意精度问题即可
代码:
#include <bits/stdc++.h>
using namespace std;
int main(){
double x, y;//精度
cin >> x >> y;
printf("%lf %lf", 0.5 * (x + y), sqrt(3.0) / 2.0 * (x - y));//精度
return 0;
}这是 2026年1月23日 存档的第 1 版,不是当前版本。查看当前版本
题目传送门
没什么好说的,按照公式输出就行了,注意精度问题即可
代码:
#include <bits/stdc++.h>
using namespace std;
int main(){
double x, y;//精度
cin >> x >> y;
printf("%lf %lf", 0.5 * (x + y), sqrt(3.0) / 2.0 * (x - y));//精度
return 0;
}