SHARE
TWEET

Untitled

a guest Dec 8th, 2019 115 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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='')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top