Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
92073 | 刘佳宇 | 11计算分段函数的值 | C++ | Wrong Answer | 1 MS | 264 KB | 211 | 2024-09-28 11:11:29 |
#include<iostream> using namespace std; int main(){ double x,y; scanf("%lf",&x); if(x<5) y=-x+2.5; else if(x<10) y=2-1.5*(x-3)*(x-3); else y=x/2-1.5; printf("%.3lf",y); return 0; }
------Input------
7.8
------Answer-----
-12.400
------Your output-----
-32.560