#include <bits/stdc++.h>
using namespace std ;
//#define int long long
int MOD = 1e9+7 ;
int b[1234] ;
int32_t main()
{
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int k ; cin >> k ;
for ( int i = 0 ; i < k ; i++ )
{
cin >> b[i] ;
}
for ( int i = 10000 ; i <= 10000000 ; i++ )
{
for ( int j = 0 ; j < k ; j++ )
{
int x = i+j , bo = 0 ;
while(x)
{
int g = x%10 ;
//cout << g << " " << b[i] << endl ;
if ( g == b[j] ) { bo = 1 ; break ; }
x/=10 ;
}
if (bo==0) break ;
if ( j == (k-1) )
{
cout << i << endl ;
return 0 ;
}
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |