1 test case getting failed, can;t figure out why?
hers’s the code;
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
long long int n;
cin>>n;
long long int temp=n;
vector k;
while(n>0)
{
long long int x=n%10;
if(x>4 and n/10>0)
x=9-x;
k.push_back(x);
n/=10;
}
reverse(k.begin(),k.end());
for(long long int i=0;i<k.size();i++)
cout<<k[i];
return 0;
}