| ||||||||||
| 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 | |||||||||
Re:太简单还有这么多人不过,无语,其实我也是个菜鸟……In Reply To:太简单还有这么多人不过,无语,其实我也是个菜鸟…… Posted by:visual at 2006-04-13 14:18:03 > #include<iostream>
> using namespace std;
>
> int main()
> {
> long a[4];
> int n;
> long d;
> cin>>n;
> for(int i =1; i<=n; i++)
> {
> cin>>a[0]>>a[1]>>a[2]>>a[3];
> if((a[1]-a[0]==a[2]-a[1])&&(a[3]-a[2]==a[2]-a[1]))
> cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<" "<<a[3]<<" "<<a[3]+a[2]-a[1]<<endl;
> else
>
> cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<" "<<a[3]<<" "<<a[3]*a[1]/a[0]<<endl;
> }
>
>
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator