Run ID:1025
提交时间:2023-06-24 14:29:34
#include<bits/stdc++.h> using namespace std; int main(){ int x; cin>>x; if (x<5&&x>=0){ cout<<fixed<<setprecision(3)<<-x+2.5; }else if(x<=5&&x<10){ cout<<fixed<<setprecision(3)<<2-1.5*(x-3)*2; }else{ cout<<fixed<<setprecision(3)<<x/2-1.5; } }