Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
50565 | eric | 根据x值,求y值 | C++ | Accepted | 0 MS | 244 KB | 174 | 2024-08-30 18:56:52 |
#include<bits/stdc++.h> using namespace std; int main() { int x; cin>>x; if(x>=0&&x<=3) cout<<3*x-5; if(x>3) cout<<4; if(x<0) cout<<14-2*x; return 0; }