DiYane

Building 6/11

Aug 19th, 2021
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. floor_cnt = int(input())
  2. rooms_cnt = int(input())
  3.  
  4. if floor_cnt == 1:
  5.     for room_num in range (0,rooms_cnt):
  6.         print(f'L1{room_num}', end=' ')
  7.  
  8. else:
  9.     for floor_num in range(floor_cnt,0,-1):
  10.         for room_num in range (0,rooms_cnt):
  11.             if floor_num == floor_cnt:
  12.                 print(f'L{floor_num}{room_num}', end =' ')
  13.             elif floor_num % 2 == 0:
  14.                 print(f'O{floor_num}{room_num}', end=' ')
  15.             else:
  16.                 print(f'A{floor_num}{room_num}', end= ' ')
  17.         print('')
Advertisement
Add Comment
Please, Sign In to add comment