1 solutions

  • 0
    @ 2024-7-20 20:47:30

    聪明人才自己写,傻子都用<cmath>里的abs函数

    #include<bits/stdc++.h>
    using namespace std;
    double b;
    int main(){
    	cin>>b;
    	cout<<fixed<<setprecision(2)<<abs(b);
    	return 0;
    }
    
    • 1

    Information

    ID
    6880
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    1
    Tags
    # Submissions
    12
    Accepted
    7
    Uploaded By