答案3181
#include<bits/stdc++.h>
using namespace std;
int a[10];
int del(int n){
while(n){
int index=n%10;
if(a[index]==0)return 0;
else a[index]--;
n/=10;
}
return 1;
}
int main()
{
int n=1;
for(int i=0;i<=9;i++)a[i]=2021;
while(1){
if(del(n)==0)break;
else n++;
}
cout<<n-1;
return 0;
}