Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
80751 sh25_zhangyy 分段函数 C++ 通过 0 MS 252 KB 395 2026-01-04 15:30:00

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; }


测评信息: