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),
- c = scanner.nextLine().charAt(0);
- int d = Integer.parseInt(scanner.nextLine()),
- e = Integer.parseInt(scanner.nextLine()),
- f = Integer.parseInt(scanner.nextLine()),
- counter = Integer.parseInt(scanner.next());
- for (int i = 1; i <= a; i++) {
- for (char j = 'A'; j <= b; j++) {
- for (char k = 'a'; k <= c; k++) {
- for (int l = 1; l <= d; l++) {
- for (int m = 1; m <= e; m++) {
- for (int n = 1; n <= f; n++) {
- if (--counter == 0) {
- System.out.printf("%d%c%c%d%d%d\n", i, j, k, l, m, n);
- System.exit(0);
- }
- }
- }
- }
- }
- }
- }
- System.out.println("No password on this position");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement