http://acm.hdu.edu.cn/showproblem.php?pid=2134

#include <bits/stdc++.h>
using namespace std;
int main() {
double R;
while(cin >> R) {
if(R == 0)
break;
double r1, r2;
r1 = sqrt(R * R / 3.0);
r2 = sqrt(R * R * 2.0 / 3.0);
printf("%.3lf %.3lf\n", r1, r2);
}
return 0;
}
原文:https://www.cnblogs.com/zlrrrr/p/9410864.html