求解答~!!!!
  • 板块B2066 救援
  • 楼主wh807599159
  • 当前回复2
  • 已保存回复2
  • 发布时间2022/1/10 19:32
  • 上次更新2023/10/28 12:32:42
查看原帖
求解答~!!!!
602209
wh807599159楼主2022/1/10 19:32
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
   double x = 0, y = 0,t=0;
   int nums = 0,n = 0;
   cin >> n;
   for (int i = 1; i <= n; i++)
	{
    cin >> x >> y >> nums;
    t+= (sqrt(x * x + y * y) / 50) * 2 + 1.5 * nums;
	}
	cout << ceil(t) << endl;
}

为什么只有40啊!!!!

2022/1/10 19:32
加载中...