#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define inf 1e18
const int mod=1e9+7;
const int N=2e5+5;
int n,m;
int a[N];
void solve(){
int n;
cin>>n;
int t=n;
vector<int>a;
while(n){
if(n%10==0) a.push_back(1);
else a.push_back(0);
n/=10;
}
int ans=0;
for(int i=a.size()-1;i>=0;i--){
ans=ans*10+a[i];
}
while(ans==0||t%10==ans) ans++;
cout<<ans<<endl;
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int tt=1;
cin>>tt;
while(tt--) solve();
return 0;
}
小A的数字(思维)--牛客小白月赛90-C
最新推荐文章于 2024-10-07 17:56:04 发布