Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
77744 sh25_shengmy 分段函数 C++ 通过 0 MS 256 KB 395 2025-12-26 14:44:31

Tests(1/1):


#include <bits/stdc++.h> using namespace std; int main() { double a,b; cin >> a; if(a<5.0) { b=-a+2.5; cout << fixed << setprecision(3) <<b; } else if(a<10.0) { b=2.0-1.5*(a-3.0)*(a-3.0); cout << fixed << setprecision(3) << b; } else { b=a/2.0-1.5; cout << fixed << setprecision(3) << b; } return 0; }


测评信息: