Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = int(input())
- b = int(input())
- pass_count = int(input())
- char_A = 35
- char_B = 64
- output = ''
- for j in range(1, a + 1):
- for x in range(1, b + 1):
- if char_A == 56:
- char_A = 35
- if char_B == 97:
- char_B = 64
- output += f'{chr(char_A)}{chr(char_B)}{j}{x}{chr(char_B)}{chr(char_A)}|'
- pass_count -= 1
- char_A += 1
- char_B += 1
- if pass_count == 0:
- break
- if pass_count == 0:
- break
- print(output)
- ДРУГО РЕШЕНИЕ:
- a = int(input())
- b = int(input())
- pass_count = int(input())
- char_A = 35
- char_B = 64
- output = ''
- for j in range(1, a + 1):
- for x in range(1, b + 1):
- if char_A == 56:
- char_A = 35
- if char_B == 97:
- char_B = 64
- print(f'{chr(char_A)}{chr(char_B)}{j}{x}{chr(char_B)}{chr(char_A)}', end='|')
- pass_count -= 1
- char_A += 1
- char_B += 1
- if pass_count == 0:
- exit(0)
Add Comment
Please, Sign In to add comment