desislava_topuzakova

06. Building

Nov 7th, 2020
2,564
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. floors = int(input())
  2. rooms = int(input())
  3.  
  4. #6, 5, 4, 3, 2, 1
  5. for floor in range(floors, 0, -1):
  6.     for room in range(0, rooms):
  7.         if floor == floors:
  8.             print(f"L{floor}{room}", end=" ")
  9.         elif floor % 2 == 0:
  10.             print(f"O{floor}{room}", end=" ")
  11.         elif floor % 2 == 1:
  12.             print(f"A{floor}{room}", end=" ")
  13.     print()
Advertisement
Add Comment
Please, Sign In to add comment