changed the file structure

This commit is contained in:
Sage The DM 2024-08-27 10:41:17 +02:00
parent cd81159162
commit b1c3582880
391 changed files with 675 additions and 0 deletions
Code/Steiner/findNumberXwithY/src

Binary file not shown.

View file

@ -0,0 +1,20 @@
public class App {
public static int findNumber(int numberOfNumbers, String startSequenz) {
int counter = 0;
int i = Integer.parseInt(startSequenz);
while (true) {
if (String.valueOf(i).startsWith(startSequenz)) {
counter++;
if (counter == numberOfNumbers) {
return i;
}
}
i++;
}
}
public static void main(String[] args) {
System.out.println(findNumber(12, "253"));
System.out.println(findNumber(1000, "9876"));
}
}