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<iostream> using namespace std; int main() { int n,a,d,i; int s[10]; cin>>n; while(n--) { for(i=0;i<4;i++) { cin>>a; s[i]=a; } if((s[3]-s[2])==(s[2]-s[1])) { d=s[3]-s[2]; s[4]=s[3]+d; } else { d=s[3]/s[2]; s[4]=s[3]*d; } for(i=0;i<5;i++) { if(i<4) cout<<s[i]<<" "; else cout<<s[i]<<endl; } } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator