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:zhangjb at 2005-02-19 00:04:23 #include<stdio.h> int main() {long a[20][5],t,d; int i,j,n,mark=1; scanf("%d",&n); for(i=0;i<n;i++) for(j=0;j<4;j++)scanf("%ld",&a[i][j]); for(i=0;i<n;i++) {d=a[i][1]-a[i][0];mark=1; for(j=0;j<4;j++) {printf("%ld ",a[i][j]); if(a[i][j]!=a[i][0]+j*d){mark=0;}} if(mark)a[i][4]=a[i][3]+d; else a[i][4]=a[i][1]/a[i][0]*a[i][3]; printf("%ld\n",a[i][4]); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator