基本思路:
无;
关键点:
无;
#include<iostream> #include<vector> #include<algorithm> #include<string> #include<cmath> #include<set> #include<map> using namespace std; int main() { double x0, y0, z0; double x1, y1, z1; while (cin >> x0 >> y0 >> z0 >> x1 >> y1 >> z1){ double pi = acos(-1); double r = sqrt(pow(abs(x0 - x1), 2) + pow(abs(y0 - y1), 2) + pow(abs(z0 - z1), 2)); double v = 4 * pi * pow(r, 3)/3; //cout << v << endl; printf("%.3lf %.3lf\n", r, v); } return 0; }
原文地址:https://www.cnblogs.com/songlinxuan/p/12394748.html
时间: 2024-11-06 10:01:50