Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pos = input()
- place = pos[-1]
- row1 = pos[:len(pos) - 1]
- res = 0
- row = int(row1)
- row-=1
- d = {"f":1, "e":2, "d":3, "a":4, "b":5, "c":6}
- res = (row // 4) * 12
- if row % 4 == 3:
- res+=4
- elif row % 4 == 1:
- res+= 6
- print(res + row + d[place])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement