As mentioned in the ques we need to take an integer not string, “Each test case contains a single line of input, an integer A”. But the solutions are got accepted by taking input as strings.
If we are taking input as integer for a number, for the same process, it is showing wrong answer.
let me know If I m wrong.
**More interesting part is the the editorial’s solution also wrote the input as string.
Attaching two solutions,
first with input as Integer
void solve()
{
ll n;
cin>>n;
string s;
//cin>>s;
s=to_string(n);
if(s[0]=='1')
{
cout <<s[0]<<"0";
in(i,1,s.size())
{
cout <<s[i];
}
}
else
{
cout <<"1"+s;
}
cout <<endl;
}
** Now with taking input of a number as a string**
void solve()
{
string s;
cin>>s;
if(s[0]=='1')
{
cout <<s[0]<<"0";
in(i,1,s.size())
{
cout <<s[i];
}
}
else
{
cout <<"1"+s;
}
cout <<endl;
}