Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. floors = int(input())
  2. premises = int(input())
  3. last_floor = floors
  4. for f in range(floors, 0, -1):
  5.     for p in range(premises):
  6.         if f == last_floor:
  7.             if p == premises - 1:
  8.                 print(f'L{f}{p}')
  9.             else:
  10.                 print(f'L{f}{p} ', end='')
  11.         elif f % 2 == 0:
  12.             if p == premises - 1:
  13.                 print(f'O{f}{p}')
  14.             else:
  15.                 print(f'O{f}{p} ', end='')
  16.         else:
  17.             if p == premises - 1:
  18.                 print(f'A{f}{p}')
  19.             else:
  20.                 print(f'A{f}{p} ', end='')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement