About input of a number

If a number is input as 0055 should it be considered as 55 or 0055 ? I am having problem int the code of replacing 0 with 5 in a number. Only one test case is not being passed. I thought this would be the unsolved case.

hi @sumitrs9090_efe8a49fc5093b58 try if input is 0, ans is 5

@sumitrs9090_efe8a49fc5093b58 also refer

#include<bits/stdc++.h>
using namespace std;
int main() {
	string s;
	cin>>s;
	int n = s.length();
	for(int i=0;i<n;i++){
		if(s[i] == '0')s[i] = '5';
	}
	cout<<s<<endl;
}

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.