''' Python的输入是野生字符串,所以要自己转类型 strip去掉首尾的空格和换行符(默认时),返回str slipt把字符串按空格拆开(默认时),返回[str] map把list里面的值映射到指定类型,返回[type]'''
while True: try: a, b = [int(i) for i in input().strip().split()] print(a + b) except EOFError: break
T = int(input().strip()) for case in range(T): a, b = map(int, input().strip().split()) print(a + b)
while True: a, b = map(int, input().strip().split()) if a == 0 and b == 0: break print(a + b)
|