Spocoman

06. Wedding Seats

Jan 1st, 2022 (edited)
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. final_sector = ord(input())
  2. rows = int(input())
  3. odd_seats = int(input())
  4. total_seats = 0
  5.  
  6. for i in range(ord('A'), final_sector + 1):
  7.     for k in range(1, rows + 1):
  8.         currentSeats = odd_seats
  9.         if k % 2 == 0:
  10.             currentSeats += 2
  11.         for o in range(ord('a'), currentSeats + 97):
  12.             print(f'{chr(i)}{k}{chr(o)}')
  13.             total_seats += 1
  14.     rows += 1
  15.  
  16. print(total_seats)
  17.  
Add Comment
Please, Sign In to add comment