Sichanov

wedding_seats

Dec 23rd, 2020
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. last_sector = input()
  2. number_of_rows_in_first_sector = int(input())
  3. odd_row_places = int(input())
  4. last_sector_ord = ord(last_sector)
  5. counter = 0
  6. for each_sector in range(65, last_sector_ord + 1):
  7.     if each_sector > 65:
  8.         number_of_rows_in_first_sector += 1
  9.     for each_row in range(1, number_of_rows_in_first_sector + 1):
  10.         if each_row % 2 == 0:
  11.             seats = odd_row_places + 2
  12.         else:
  13.             seats = odd_row_places
  14.         for each_place in range(97, 97 + seats):
  15.             counter += 1
  16.             print(f'{chr(each_sector)}{each_row}{chr(each_place)}')
  17. print(counter)
Advertisement
Add Comment
Please, Sign In to add comment