Advertisement
riff-raff

BiletnaKombinaciq

Nov 24th, 2018
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 KB | None | 0 0
  1. nomerKombinaciq = int(input())
  2.  
  3. counter = 0
  4. combination = ""
  5. prize = 0
  6.  
  7. for x1 in range(66, 76 + 1):
  8.     symbol1 = chr(x1)
  9.     for x2 in range(102, 97 - 1, -1):
  10.         symbol2 = chr(x2)
  11.         for x3 in range(65, 67 + 1):
  12.             symbol3 = chr(x3)
  13.             for x4 in range(1, 11):
  14.                 for x5 in range(10, 0, -1):
  15.                     if (x1 % 2 == 0):
  16.                         counter += 1
  17.                         combination = f"{symbol1}{symbol2}{symbol3}{x4}{x5}"
  18.                         prize = x1 + x2 + x3 + x4 + x5
  19.                         if (counter == nomerKombinaciq):
  20.                             print(f"Ticket combination: {combination}")
  21.                             print(f"Prize: {prize} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement