Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int a = Integer.parseInt((scanner.nextLine()));
- char b = scanner.nextLine().charAt(0);
- char c = scanner.nextLine().charAt(0);
- char d = scanner.nextLine().charAt(0);
- int e = Integer.parseInt((scanner.nextLine()));
- int n = Integer.parseInt((scanner.nextLine()));
- for (int i = a; i <= 99; i++) {
- for (char j = b; j <= 'Z'; j++) {
- for (char k = c; k <= 'z'; k++) {
- for (char l = d; l <= 'Z'; l++) {
- for (int m = e; m >= 10; m--) {
- if (i % 10 == 2 && m % 10 == 5) {
- n--;
- if (n == 0) {
- System.out.printf("%d%c%c%c%d\n", i, j, k, l, m);
- System.exit(0);
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement