| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 76563 | sh25_zhangjiajia | 分段函数 | C++ | Accepted | 0 MS | 252 KB | 422 | 2025-12-19 15:27:57 |
#include <bits/stdc++.h> #include <iostream> 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; }