真的給想不開人的解答:try: while True: res=0 tem=0 j=list(input()) j.reverse() k=len(j) for i in range(0,k): tem=((-2)**i)*int(j[i]) res+=tem print(str(res)) except EOFError: pass