Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- coding = (
- 'QWERT'
- 'UIOPS'
- 'ASDFL'
- 'ZXCVB'
- 'TYUES'
- )
- inp = '02 34 20 23 00 00 00'
- ret = []
- try:
- while True:
- for line in input().split('\n'):
- buf = []
- for pair in line.split():
- row, col = map(int, list(pair))
- if row == 0 and col == 0 and buf and buf[-1] == 'Q':
- buf[-1] = 'U'
- continue
- buf.append(coding[row * 5 + col])
- ret.append(''.join(buf))
- except EOFError:
- ...
- print(' '.join(ret))
Advertisement
Add Comment
Please, Sign In to add comment