Run ID:92073

提交时间:2024-09-28 11:11:29

#include<iostream> using namespace std; int main(){ double x,y; scanf("%lf",&x); if(x<5) y=-x+2.5; else if(x<10) y=2-1.5*(x-3)*(x-3); else y=x/2-1.5; printf("%.3lf",y); return 0; }