import
sys
for
line
in
sys.stdin:
n,
=
line.split()
n
=
int
(n)
for
i
in
range
(n):
line
=
sys.stdin.readline()
a,b,c,d
=
line.split()
a,b,c,d
=
int
(a),
int
(b),
int
(c),
int
(d)
if
(b
-
a)
=
=
(d
-
c):
# 等差數列
print
(a,b,c,d,d
+
(d
-
c))
else
:
# 等比數列
print
(a,b,c,d,
int
(d
*
(d
/
c)))
import
sys
for
line
in
sys.stdin:
n,
=
line.split()
n
=
int
(n)
for
i
in
range
(n):
line
=
sys.stdin.readline()
a,b,c,d
=
line.split()
a,b,c,d
=
int
(a),
int
(b),
int
(c),
int
(d)
if
(b
-
a)
=
=
(d
-
c):
# 等差數列
(a,b,c,d,d
+
(d
-
c))
else
:
# 等比數列
(a,b,c,d,
int
(d
*
(d
/
c)))
你是真看不懂字??