t=input()
while (20>=int(t)>=1) :
num=input().split()
if int(num[1])-int(num[0])==int(num[2])-int(num[1]):
print(num[0],num[1],num[2],num[3],2*int(num[3])-int(num[2]))
else:
print(num[0],num[1],num[2],num[3],int(num[3])**2//int(num[2]) )
感激不盡
t=input()
while (20>=int(t)>=1) :
num=input().split()
if int(num[1])-int(num[0])==int(num[2])-int(num[1]):
print(num[0],num[1],num[2],num[3],2*int(num[3])-int(num[2]))
else:
print(num[0],num[1],num[2],num[3],int(num[3])**2//int(num[2]) )
感激不盡
想了一下成功了 前者會進入無窮 = =