[Init] Solved solutions

This commit is contained in:
2023-03-02 20:58:03 +07:00
parent 51f667ac81
commit 20542601dd
131 changed files with 4148 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#include <iostream>
using namespace std;
bool check(int n)
{
int a = n/1000;
int b = (n/100)%10;
if (b == a)
{
return 0;
}
int c = (n/10)%10;
if (c == a || c == b)
{
return 0;
}
int d = n%10;
if (d == a || d == b || d == c)
{
return 0;
}
return 1;
}
int main()
{
int n;
cin >> n;
do
{
n++;
} while (check(n) == 0);
cout << n;
return 0;
}