while True: try: n,l1 = int(input),map(int,input().split()) a,b,s = 0,0,0 for i in l1:  ...