Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
51301 zhangsicun 分段函数 C++ 解答错误 0 MS 248 KB 257 2024-09-20 19:25:53

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int main() { int x; cin >> x; if(0 <= x < 5){ cout<<-x+2.5; }if(5 <= x < 10){ cout<<2-1.5*(x-3)*(x-3); }if(10 <= x < 20){ cout<<x/2-1.5; } return 0; }


测评信息: