Testcases not passed . Kindly provide some hints

2 testcases did not pass . Kindly help in corner cases

// Chewbacca and Numbers

// given a number invert its digits (9-t) and find smallest number

#include
#include
using namespace std;
int main(){
long long N ;
cin>>N;

// Exception if number is 0 then dont do anything
if(N == 0 )
{
	cout<<N;
	return 0 ;
}

// store the number in an array in reverse order
vector<int> arr;
while(N>0){
	arr.push_back(N%10);
	N= N/10 ;
}
int len = arr.size();

// Check at each index to find minimum value and Replace 
for (int i = 0 ;i<len;i++){
	
	if(arr[i] > (9 - arr[i])){
		arr[i] = (9 - arr[i]);
	}
}

// Make the ans by forming the new Number 
long long ans = 0 ;
for(int i = len-1 ; i >=0 ;i--){
	ans = ans*10 + arr[i];
}

cout<<ans ;

}

hey @achin1tya in the case where the first digit is nine for example 9444 you are making 9 zero, but it is mentioned in the question that number shouldnt start with zero so you should include an exception that if the first character is 9, do not change it.

thx man . I totally forgot about this case.