AlgorithmOJ
Problem
Local Problems
All Problems
Problem Category
Status
Contest
Standard Contests
Replay Contests
Virtual Contests
Ranklist
More...
News
About
F.A.Q
Recent Contests
Coming Soon...
Login
Register
2026-08-08 03:53:39
Eva's Problem
Time Limit:
1000ms
Memory Limit:
10000KB
This problem will be judged on
PKU
. Original ID:
1658
64-bit integer IO format:
%lld
Java class name:
Main
Prev
Submit
Status
Statistics
Next
Font Size:
Description
Eva的家庭作业里有很多数列填空练习。填空练习的要求是:已知数列的前四项,填出第五项。因为已经知道这些数列只可能是等差或等比数列,她决定写一个程序来完成这些练习。
Input
第一行是数列的数目t(0 <= t <= 20)。以下每行均包含四个整数,表示数列的前四项。约定数列的前五项均为不大于10^5的自然数,等比数列的比值也是自然数。
Output
对输入的每个数列,输出它的前五项。
Sample Input
2 1 2 3 4 1 2 4 8
Sample Output
1 2 3 4 5 1 2 4 8 16
Source
POJ Monthly--2004.05.15 Null
Language:
C++
C++11
C++14
C
Java
Pascal
Python2
Python3
C#
Fortran
Perl
Ruby
Ada
SML
Visual C++
Visual C
CLang
CLang++
Theme:
Monokai
Solarized Light
Material
Share Code?
Yes
No
×
Login
Username:
Password:
Cookie:
Never
One Day
One Week
One Month
One Year
×
Register
Username:
Password:
Repeat Password:
Nickname:
School:
Email:
×
News Title
by