6 条题解

  • 2
    @ 2022-8-29 16:33:18
    #include<stdio.h>
    using namespace std;
    int main()
    {
    	double r,pi=3.14;
    	scanf("%lf",&r);
    	printf("%.2lf",1.0*4/3*pi*r*r*r);
    	return 0;
    }
    
    • 1
      @ 2026-1-26 14:55:06
      #include <iostream>
      #include <iomanip>
      using namespace std;
      int main()
      {
          double r;
          cin >> r;
          cout << fixed << setprecision(2) << 1.333333333 * 3.14 * r * r * r;
          return 0;
      }
      • 1
        @ 2025-6-2 17:24:11

        #include<stdio.h>

        using namespace std;

        int main()

        {

        double r,pi=3.14;
        
        scanf("%lf",&r);
        
        printf("%.2lf",1.0*4/3*pi*r*r*r);
        
        return 0;
        

        }

        • 0
          @ 2023-8-7 20:08:26
          #include<bits/stdc++.h>
          #include<cstring>
          #include<queue>
          #include<set>
          #include<stack>
          #include<vector>
          #include<map>
          #define ll long long
          using namespace std;
          const int N=1e5+10;
          const int M=2023;
          const int inf=0x3f3f3f3f;
          double r;
          double power(double a,int b,ll p)
          {
          	ll ans=1,wq=a;
          	while(b)
          	{
          		if(b & 1)ans=ans*wq;
          		wq=wq*wq;
          		b>>=1;//删掉最后一位
          	}
          	return ans;
          }
          int main()
          {
          	cin>>r;
          	double v=3.14*power(r,3,inf)/3*4;
          	printf("%.2f",v);
          	return 0;
          }
          
          
          • -1
            @ 2022-8-12 21:33:09
            #include <iostream>
            #include <algorithm>
            #include <cstdio>
            #include <cstring>
            #include <string>
            #include <iomanip>
            #include <cmath>
            #include <queue>
            #include <map>
            #include <stack>
            #include <vector>
            using namespace std;
            #define long long LL
            const int N = 1e6+5;
            const double pi = 3.14;
            double r,V;
            int main(){
                cin >> r;
                V = pi * 4 / 3 * r * r * r;
                printf("%.2lf",V);
                return 0;
            }
            
            • -4
              @ 2022-1-21 23:23:40
              #include <iostream>
              #include <iomanip>
              using namespace std;
              int main(){
                  double r,p2=3.14;
                  cin>>r;
                  r=r*r*r;
                  cout<<fixed<<setprecision(2)<<r*p2*(4.0/3)<<endl;
                  return 0;
              }
              • 1

              信息

              ID
              832
              时间
              1000ms
              内存
              128MiB
              难度
              3
              标签
              递交数
              191
              已通过
              105
              上传者