a005.
Eva 的回家作業
--
POJ
| From: [123.195.39.38] |
發表日期
:
2012-07-13 00:08
/**********************************************************************************/
/* Problem: a005 "Eva 的回家作業" from POJ */
/* Language: C (589 Bytes) */
/* Result: WA(line:4) judge by this@ZeroJudge */
/* Author: jerry510k at 2012-07-13 00:05:37 */
/**********************************************************************************/
#include<stdio.h>
int main(){
int t,i;
while (scanf("%d",&t)!=EOF && t<=20&&t>=0){
int a[t-1],b[t-1],c[t-1],d[t-1],e[t-1];
for(i=0; i<t;i++){
scanf("%d %d %d %d",&a[i],&b[i],&c[i],&d[i]);
}
for(i=0; i<t;i++){
if (((b[i]-a[i])==(c[i]-b[i]))&&((c[i]-b[i])==(d[i]-c[i]))){
printf("%d %d %d %d %d\n",a[i],b[i],c[i],d[i],d[i]*2-c[i]);
}
if (((b[i]/a[i])==(c[i]/b[i]))&&((c[i]/b[i])==(d[i]/c[i]))){
printf("%d %d %d %d %d\n",a[i],b[i],c[i],d[i],d[i]*d[i]/c[i]);
}
}
}
return 0;
}
WA (line:4)
答案不正確
您的答案為: 1 1 1 1 1
正確答案為: 2 4 6 8 10