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; }
Firstly, why dont you use
code block
to fancy your codeSecondly, if you are not trying to write editorials, I suggest you to use github for storing code instead