Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sector = input()
- num_of_row = int(input())
- num_of_seats_odd_row = int(input())
- num_of_A = ord('A')
- num_of_end = ord(sector)
- num_of_small_a = ord('a')
- counter_row = 1
- total_seats = 0
- for i in range(num_of_A, num_of_end + 1):
- for i2 in range(1, num_of_row + (i - num_of_A) + 1):
- if i2 % 2 == 0:
- for i3 in range(num_of_small_a, num_of_small_a + num_of_seats_odd_row + 2):
- print(f'{chr(i)}{i2}{chr(i3)}')
- total_seats += 1
- else:
- for i3 in range(num_of_small_a, num_of_small_a + num_of_seats_odd_row):
- print(f'{chr(i)}{i2}{chr(i3)}')
- total_seats += 1
- print(total_seats)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement