import sys mapping = { '0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'a': 10, 'b': 11, 'c': 12, 'd': 13, 'e': 14, 'f': 15 } for x in sys.stdin: # 常规方法 x = x.strip().lower().replace('0x', '') if not x: continue v = 0 for i, ch...