Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n,j,k,r;
  7. k=0;
  8. cin>>n;
  9. for(int i=n+1; ; i++)
  10. {
  11. set<int>se;
  12. j=i;
  13. while(j>0)
  14. {
  15. r=j%10;
  16. j/=10;
  17. se.insert(r);
  18. }r=0;
  19. if(se.size()==4){
  20. cout<<i;
  21. return 0;}
  22. }
  23.  
  24.  
  25. return 0;
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement