20 条题解

  • 0
    @ 2024-7-16 13:48:59

    #include <bits/stdc++.h> using namespace std;

    int main(){ double x; cin>>x; double y; if(0<=x && x<5){ y=-x+2.5; }else if(5<=x && x<10){ y=2-1.5*(x-3)*(x-3); }else if(10<=x && x<20){ y=x/2-1.5; } cout<<fixed<<setprecision(3)<<y; return 0; }

    信息

    ID
    97
    时间
    1000ms
    内存
    128MiB
    难度
    6
    标签
    (无)
    递交数
    939
    已通过
    260
    上传者