Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- last_sector = input()
- list_alphabet_up = []
- list_alphabet_lo_odd = []
- list_alphabet_lo_even = []
- count_rows_first_sector = int(input())
- count_seats_odd_row = int(input())
- end_lett_odd_row_seats = 97 + count_seats_odd_row
- n = ord(last_sector)
- # print(n)
- res = ""
- for indx in range(65, 91): # 65 - 90 Cap, Буква = chr(idx), ASCII = ord(char)
- if indx <= n:
- list_alphabet_up.append(chr(indx))
- for indx in range(97, 123): # 97 - 122 lower, Буква = chr(idx), ASCII = ord(char)
- if indx < end_lett_odd_row_seats:
- list_alphabet_lo_odd.append(chr(indx))
- for indx in range(97, 123): # 97 - 122 lower, Буква = chr(idx), ASCII = ord(char)
- if indx < end_lett_odd_row_seats + 2: # Места на четните редове
- list_alphabet_lo_even.append(chr(indx))
- add_row = 0
- all_seats = 0
- # print(list_alphabet_up)
- # print(list_alphabet_lo)
- for sect in list_alphabet_up:
- for row in range(1 , count_rows_first_sector + add_row + 1):
- if row % 2:
- for seat in list_alphabet_lo_odd:
- print(sect + str(row) + seat)
- all_seats += 1
- elif not row % 2:
- for seat in list_alphabet_lo_even:
- print(sect + str(row) + seat)
- all_seats += 1
- add_row += 1
- print(all_seats)
- # print(f'{сектор}{ред}{място}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement