Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
65616 | laichihao | 分段函数 | C++ | 编译错误 | 0 MS | 0 KB | 280 | 2025-05-23 14:54:48 |
#include<bits/stdc++.h> using namespace std; int main() { float x; cin>>x; if(0<=x&&x<5.0){ cout<<fixed<<setprecision(3)<x+2.5; } if(5.0<=x&&x<10.0){ cout<<fixed<<setprecision(3)<2-1.5*(x-3)*(x-3); } if(10.0<=x&&x<20.0){ cout<<fixed<<setprecision(3)<x/2-1.5; } }