BbJLeB

05. Building

Jun 3rd, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. # 05. Building
  2.  
  3. floors = int(input())
  4. rooms = int(input())
  5. letter = None
  6.  
  7. for floor in range(floors, 0, -1):
  8.     for room in range(0, rooms):
  9.         if floor == floors:
  10.             letter = "L"
  11.         elif floor % 2 == 0:
  12.             letter = "O"
  13.         else:
  14.             letter = "A"
  15.         print(f"{letter}{floor}{room} ", end='')
  16.     print()
Add Comment
Please, Sign In to add comment