Monday, November 6, 2017

DCP-394: Square of N Devskill Problem Solution


 https://www.devskill.com/CodingProblems/ViewProblem/394




#include<bits/stdc++.h>

using namespace std;

int main()

{
    string s;
    while(cin>>s){
    int p=s.length();
    for(int i=0;i<p-1;i++)
    {
        printf("9");
    }
    printf("8");
    for(int i=0;i<p-1;i++)
    {
        printf("0");
    }
    printf("1\n");
    }
    return 0;
}

No comments:

Post a Comment