ALEXANDAR_GEORGIEV

building_2

May 31st, 2022 (edited)
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. count_floors = int(input())
  2. count_rooms = int(input())
  3. # Последен етаж
  4. for room in range(0, count_rooms):
  5.     print(f'L{count_floors}{room} ', end='')
  6. print()
  7.  
  8. for floor in range(count_floors - 1, 0, -1):
  9.     if floor % 2:  # Нечетни етажи
  10.         for room in range(0, count_rooms):
  11.             print(f'A{floor}{room} ', end='')
  12.         print()
  13.     else:
  14.         for room in range(0, count_rooms):
  15.             print(f'O{floor}{room} ', end='')
  16.         print()
Add Comment
Please, Sign In to add comment