Run ID:119932

提交时间:2025-05-21 21:31:53

#include <iostream> using namespace std; int main() { double x,y; cin>>x; if(x>=0&&x<5) y=x+2.5; else if(x<10) y=2-1.5*(x-3)*(x-3); else if (x<20) y=x*x-1.5; else y=0; y=(int)(y*1000+0.5)/1000.0; cout<<y; return 0; }