Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
36945 C++|刘一阳 分段函数 C++ 通过 0 MS 248 KB 307 2024-01-18 14:37:55

Tests(1/1):


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


测评信息: