Sichanov

ddd

Apr 25th, 2021
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. floors = int(input())
  2. rooms = int(input())
  3. letter = ""
  4. conc = f"L{floors}{0}"
  5. if floors == 0 or rooms == 0:
  6.     print()
  7. else:
  8.     for r in range(1, rooms):
  9.         conc += f" L{floors}{r}"
  10.     print(conc)
  11.  
  12.     for f in range(floors - 1, 0, -1):
  13.         conc = ""
  14.         if f % 2 == 0:
  15.             letter = "O"
  16.         else:
  17.             letter = "A"
  18.         conc = f"{letter}{f}0"
  19.         for r in range(1, rooms):
  20.             conc += f" {letter}{f}{r}"
  21.         print(conc)
Advertisement
Add Comment
Please, Sign In to add comment