跳到正文

题解

题解:P10520 [XJTUPC2024] 榕树之心

cabbage_flower约 1 分钟
原文
文章信息与版本

文章信息

发布
2024年5月20日
收录
2026年1月23日
更新
2026年11月16日
篇幅
约 1 分钟
题目
P10520

版本

  1. v2当前
  2. v1

题目传送门 没什么好说的,按照公式输出就行了,注意精度问题即可

代码:

C++
#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;
}

AC记录

原文
存档评论1 条抓取于