题目:
结果:不对
#include <iostream>
using namespace std;
int s[10];
bool check(int x){
while(x)
{
int t=x%10;
x/=10;
if(--s[t]<0) return false;
}
return true;
}
int main()
{
for(int i=0;i<10;i++) s[i]=2021;
for(int i=1;;i++)
{
if(!check[i])
{
cout<<i-1;
return 0;
}
}
return 0;
}