Skip to content

Commit 58b2107

Browse files
authored
Add files via upload
commit for the sol of 271A.cpp
1 parent 6df5d2e commit 58b2107

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

271A.cpp

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#include<bits/stdc++.h>
2+
3+
using namespace std;
4+
5+
int main(){
6+
7+
int x;
8+
9+
cin>>x;
10+
11+
while (1){
12+
int x = x+1;
13+
14+
int a = x/1000;
15+
int b = x/100 % 10;
16+
int c = x/10 % 10;
17+
int d = x%10;
18+
19+
if(a != b && a!=c && a!=d && b!=c && b!=d && c!=d){
20+
21+
break;
22+
}
23+
24+
}
25+
26+
cout<<x<<"\n";
27+
28+
29+
return 0;
30+
}

0 commit comments

Comments
 (0)