Run ID:66545
提交时间:2024-03-09 13:26:39
# include<iostream> # include<cstdio> using namespace std; int main(){ double x,y; scanf("%2lf",&x); if(0<=x && x<5){ y=-x+2.5; } if(5<=x && x<10){ y=2-1.5*(x-3)*2; } if(10<=x && <20){ y=x/2-1.5; } printf("%3.lf",y); return 0; }