8 条题解

  • 0
    @ 2025-8-29 2:05:20

    555

    • 0

      思路

      C=2πr,S=πr2C=2\pi r,S=\pi r^2

      code

      #include<bits/stdc++.h>
      using namespace std;
      int r;
      const double p=3.1415926;
      int main(){
      	cin>>r;
      	printf("%.2lf %.2lf",2*p*r,r*r*p);
      	return 0;
      }
      
      • 0
        @ 2024-11-6 12:56:37

        #include<bits/stdc++.h> using namespace std; const double pi=3.1415926; int main() { double r,c,s; cin>>r; c=2rpi; s=pirr; cout<<fixed<<setprecision(2)<<c<<" "; cout<<fixed<<setprecision(2)<<s; return 0; }

        • 0
          @ 2023-12-25 13:09:40

          #include<bits/stdc++.h> using namespace std; int main() { double r,c,s,PI; cin>>r;PI=3.1415926; c=2rPI ;s=PIrr; cout<<fixed<<setprecision(2)<<c<<" "<<s; return 0; }

          • -1
            @ 2024-11-6 13:29:01

            #include<bits/stdc++.h> using namespace std; int main() { double r,c,s; const double pi=3.1415926; cin>>r; c=2pir; s=pirr; cout<<fixed<<setprecision(2)<<c<<" "<<s<<endl; return 0; }

            • -1
              @ 2023-12-24 13:52:15

              NEW right

              #include<bits/stdc++.h>
              using namespace std;
               int main() 
              { double r,a,b,c;
               cin>>r; 
              a=3.1415926;
               b=2*a*r;
               c=a*r*r; 
              cout<<fixed<<setprecision(2)<<b<<" "<<c;
               return 0;
               }
              
              • -2
                @ 2023-12-24 0:00:13

                #include <stdio.h>#include <stdlib.h>int main()float r,p=3.14159,C,S;printf("输入圆的半径r\n";scanf("%f",&r);C=2pr;S=prr;printf("圆的周长C=%f\n",C);printf("圆的面积S=%f\n",S);return 0;

                • -2
                  @ 2023-12-23 13:40:43

                  #include<iostream> #include<iomanip> using namespace std; int main() { double r,a,b,c; cin>>r; a=3.1415926; b=2ar; c=arr; cout<<fixed<<setprecision(2)<<b<<" "<<c; return 0; }

                  • 1

                  信息

                  ID
                  12
                  时间
                  1000ms
                  内存
                  256MiB
                  难度
                  6
                  标签
                  递交数
                  390
                  已通过
                  131
                  上传者