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