20 lines
413 B
C++
20 lines
413 B
C++
// lanqiao 1443 卡片(朴素解法)
|
|
#include<bits/stdc++.h>
|
|
using namespace std;
|
|
const int N = 10;
|
|
int a[N];
|
|
int main(){
|
|
for(int i = 0; i <= 9; i++) a[i] = 2021;
|
|
for(int j = 1; ;j++){
|
|
int t = j;
|
|
while(t){
|
|
a[t%10]--;
|
|
if(a[t%10] < 0){
|
|
cout << j - 1 << endl;
|
|
return 0;
|
|
}
|
|
t /= 10;
|
|
}
|
|
}
|
|
return 0;
|
|
} |