1 solutions

  • 1
    @ 2023-9-30 13:51:16
    #include <stdio.h>
    
    int main()
    {
    	double a;
    	scanf("%lf",&a);
    	if(a<0)
    		a=-a;
    	printf("%.2f",a);
    }
    

    也可以用abs函数

    • 1

    Information

    ID
    6736
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    5
    Tags
    (None)
    # Submissions
    258
    Accepted
    102
    Uploaded By