Advertisement
George_Ivanov05

06. Wedding Seats

Mar 16th, 2021
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. sector = input()
  2. row = int(input())
  3. spots = int(input())
  4.  
  5. add = 0
  6. count = 0
  7.  
  8. for i in range(65, ord(sector) + 1):
  9. count += 1
  10. for f in range(1, count + row):
  11. if f % 2 == 0:
  12. for k in range(97,2 + spots + 97):
  13. print(f"{chr(i)}{f}{chr(k)}")
  14. add += 1
  15. else:
  16. for k in range(97, spots + 97):
  17. print(f"{chr(i)}{f}{chr(k)}")
  18. add += 1
  19. print(add)
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement