文章
84
粉丝
408
获赞
33
访问
877.1k
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
const double PI = 3.14159265;
int main()
{
int m;
cin >> m;
while (m--) {
int x1, y1, z1, x2, y2, z2;
cin >> x1 >> y1 >> z1 >> x2 >> y2 >> z2;
double r = sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) + (z1-z2)*(z1-z2));
double v = PI*4.0*r*r*r/3.0;
printf("%.2f %.2f\n", r, v);
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发