| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
水题贴代码~#include "stdio.h"
int main()
{
int T,i,a[5],t[3];
scanf ("%d",&T);
while (T--)
{
for (i=0;i<4;i++)
{
scanf ("%d",&a[i]);
}
t[0]=a[1]-a[0];
t[1]=a[2]-a[1];
t[2]=a[3]-a[2];
if(t[0]==t[1]&&t[1]==t[2])
{
a[4]=a[3]+t[0];
}
else
a[4]=a[3]*(a[3]/a[2]);
for (i=0;i<5;i++)
printf ("%d ",a[i]);
printf ("\n");
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator