| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 81386 | sh25_wuyy | 分段函数 | C++ | 通过 | 0 MS | 248 KB | 259 | 2026-01-04 17:30:42 |
#include<bits/stdc++.h> using namespace std; int main(){ float x,f; cin>>x; if(x<5){ f=2.5-x; }else if(x<10){ f=2-1.5*(x-3)*(x-3); }else{ f=x/2-1.5; }cout<<fixed<<setprecision(3)<<f; return 0; }