5 solutions

  • 0
    @ 2023-10-30 13:24:31
    # π的精度要求很高,记不到的话可以用求π的公式
    #include <stdio.h>
    #include <math.h>
    #define PI 3.14159265358979323
    int main()
    {
    	int r;
    	double s;
    	scanf("%d",&r);
    	s = pow(r,2)*PI;
    	printf("%.7lf",s);
    	return 0;
    	
    }
    

    Information

    ID
    36
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    7
    Tags
    # Submissions
    1955
    Accepted
    380
    Uploaded By