Subscribe Us

Responsive Advertisement

Advertisement

1342B codeforces solution in cpp

 

1342B codeforces solution in cpp

by ujjal roy



#include<bits/stdc++.h>

using namespace std;

main()

{

    int t,i,c=0;

    cin>>t;

    while(t--)

    {

        c=0;

        string s;

        cin>>s;

        for(i=1;i<s.size();i++)

        {

            if(s[i]!=s[i-1])

            {

                c=1;

                break;

            }

        }

        if(c==0)cout<<s<<endl;

        else

        {

            for(i=0;i<s.size();i++)

            {

                cout<<"10";

            }

            cout<<endl;

        }

    }

    return 0;

}


Post a Comment

0 Comments