| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 45614 | zouqinghua | 分段函数 | C++ | Accepted | 0 MS | 244 KB | 293 | 2024-04-17 12:57:03 |
#include<bits/stdc++.h> using namespace std; int main() { double n; cin>>n; if (0 <= n < 5){ printf("%.3lf",-n+2.5); } else if( 5 <= n < 10 ){ printf("%.3lf",2-1.5*(n-3)*(n-3)); } else{ printf("%.3lf",n/2-1.5); } return 0; }