Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul255 authored Dec 13, 2018
1 parent e6ffa0c commit 6326b94
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions 271A.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <iostream>

using namespace std;

int main()
{
int n,i,j,k,l;
cin>>n;
while(true)
{
n=n+1;
i=n/1000;
j=n/100%10;
k=n/10%10;
l=n%10;\
if(i!=j && i!=k && i!=l && j!=k && j!=l && k!=l)
{
break;

}
}
cout<<n<<endl;
return 0;
}

0 comments on commit 6326b94

Please sign in to comment.