链接:http://acm.hdu.edu.cn/showproblem.php?pid=3201

思路: 周长一定, 圆的面积最大~

View Code
 1   #include <cmath>
 2   #include <cstdio>
 3   using namespace std;
 4   const double PI = acos(-1.0);
 5   int n;
 6   int main() {
 7       while (scanf("%d", &n) != EOF) {
 8           if (n == 0) break;
 9           printf("%.2lf\n", (n / PI) * (n / PI) * PI * 0.5);
10       }
11       return 0;
12   }

相关文章:

  • 2022-02-13
  • 2021-06-22
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-18
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2022-01-24
  • 2021-12-10
  • 2022-12-23
相关资源
相似解决方案