kahkasha's blog

By kahkasha, history, 4 years ago, In English

include

#include #include #include<bits/stdc++.h> using namespace std;

int main() { int n; int a,b,c,d; cin>>n;

while(true) { n++; a=n%10; b= (n/10)%10; c= (n/100)%10; d= (n/1000)%10; if(a!=b && a!=c && a!=d && b!=c && b!=d && c!=d) break;

} cout<<n; return 0; }

  • Vote: I like it
  • -37
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Firstly, why dont you use code block to fancy your code

Secondly, if you are not trying to write editorials, I suggest you to use github for storing code instead