| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 157046 | 周谨严 | 11计算分段函数的值 | C++ | Wrong Answer | 1 MS | 272 KB | 242 | 2026-07-13 11:55:19 |
#include<iostream> using namespace std; int main(){ int n,y; cin>>n; if(0<=n&&n<5){ printf("%.3lf",n+2.5); } else if(5<=n&&n<10){ printf("%.3lf",2-1.5*(n-3)*2); } else if(10<=n&&n<20){ printf("%.3lf",n/2-1.5); } }
------Input------
17.6
------Answer-----
7.300
------Your output-----
6.500