| ||||||||||
| 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 | |||||||||
水过50题,纪念一下#include<stdio.h>
int main()
{
int a[5];
int i,n;
scanf("%d",&n);
while(n--)
{
for( i = 0 ; i < 4 ; i++ )
scanf("%d",&a[i]);
if( a[0]-a[1] == a[1]-a[2] )
{
for( i = 0 ; i < 4 ; i++ )
printf("%d ",a[i]);
printf("%d\n",a[3]+(a[1]-a[0]));
}
else
{
for( i = 0 ; i < 4 ; i++ )
printf("%d ",a[i]);
printf("%d\n",a[3]*( a[1]/a[0] ));
}
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator