提交时间:2025-05-23 14:51:22
运行 ID: 65599
#include<bits/stdc++.h> using namespace std; int main() { float x; if(0<=x<5.0){ cout<<fixed<<setprecision(3)<x+2.5; } if(5.0<=x<10.0){ cout<<fixed<<setprecision(3)<2-1.5*(x-3)*(x-3); } if(10.0<=x<20.0){ cout<<fixed<<setprecision(3)<x/2-1.5; } }