View Code of Problem 69

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<vector>
#include<map>
#include<string>
#include<set>
using namespace std;
int main(){
    int x,y;
    cin>>x;
    if(x<1)
        y=x;
    else if(1<=x&&x<10)
        y=2*x-1;
    else if(x>=10)
        y=3*x-11;
    cout<<y<<endl;
	return 0;
}
/*
110110000
111000000
011011000
100100100
010111010
001001001
000110110
000000111
000011011
*/

Double click to view unformatted code.


Back to problem 69