Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.07 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class newclass {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.  
  8.       int num = Integer.parseInt(scanner.nextLine());
  9. for (int a = 0; a<=num; a++) {
  10.     for (int i = 66; i <= 76; i++) {
  11.         for (int j = 102; j >= 97; j--) {
  12.             for (int k = 65; k <= 67; k++) {
  13.                 for (int l = 1; l <= 10; l++) {
  14.                     for (int m = 10; m >= 1; m--) {
  15. a++;
  16.                         if (a==num) {
  17.                             if (i % 2 == 0) {
  18.                                 int sum = Integer.parseInt(i + "") + Integer.parseInt(j +"") + Integer.parseInt(k +"") + Integer.parseInt(l +"") + Integer.parseInt(m + "");
  19.                                 System.out.printf("Ticket combination: %c%c%c%d%d \n", (char) i, (char) j, (char) k, l, m);
  20.                                 System.out.printf("Prize: %d lv.",sum);
  21.                             }
  22.                         }
  23.  
  24.                     }
  25.                 }
  26.  
  27.             }
  28.         }
  29.  
  30.     }
  31. }
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement