Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class newclass {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int num = Integer.parseInt(scanner.nextLine());
- for (int a = 0; a<=num; a++) {
- for (int i = 66; i <= 76; i++) {
- for (int j = 102; j >= 97; j--) {
- for (int k = 65; k <= 67; k++) {
- for (int l = 1; l <= 10; l++) {
- for (int m = 10; m >= 1; m--) {
- a++;
- if (a==num) {
- if (i % 2 == 0) {
- int sum = Integer.parseInt(i + "") + Integer.parseInt(j +"") + Integer.parseInt(k +"") + Integer.parseInt(l +"") + Integer.parseInt(m + "");
- System.out.printf("Ticket combination: %c%c%c%d%d \n", (char) i, (char) j, (char) k, l, m);
- System.out.printf("Prize: %d lv.",sum);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement