Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- floor_cnt = int(input())
- rooms_cnt = int(input())
- if floor_cnt == 1:
- for room_num in range (0,rooms_cnt):
- print(f'L1{room_num}', end=' ')
- else:
- for floor_num in range(floor_cnt,0,-1):
- for room_num in range (0,rooms_cnt):
- if floor_num == floor_cnt:
- print(f'L{floor_num}{room_num}', end =' ')
- elif floor_num % 2 == 0:
- print(f'O{floor_num}{room_num}', end=' ')
- else:
- print(f'A{floor_num}{room_num}', end= ' ')
- print('')
Advertisement
Add Comment
Please, Sign In to add comment