1 solutions
-
0
C :
#include<stdio.h> int main() { int x; scanf("%d",&x); if(x<1) printf("%d\n",x); else if(x<10) printf("%d\n",2*x-1); else printf("%d\n",3*x-11); return 0; }C++ :
#include<iostream> using namespace std; int main() { int x,y; cin>>x; if(x<1) y=x; else if(x<10) y=2*x-1; else y=3*x-11; cout<<y<<endl; return 0; }
- 1
Information
- ID
- 19316
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By