a005.
Eva 的回家作業
--
POJ
| From: [61.231.167.17] |
發表日期
:
2013-03-16 16:31
#include <stdio.h>
int main()
{
int t;
int num1, num2, num3, num4, num5;
while(scanf("%d\n", &t) != EOF)
{
int array[t][5];
while((scanf("%d %d %d %d"), &num1, &num2, &num3, &num4) != EOF)
{
if((array[t-1][1] - array[t-1][0]) == (array[t-1][2] - array[t-1][1]))
{
array[t-1][4] = array[t-1][3] + (array[t-1][1] - array[t-1][0]);
}
else
{
array[t-1][4] = array[t-1][3] * (array[t-1][1] / array[t-1][0]);
}
}
printf("%d %d %d %d %d\n", num1, num2, num3, num4, num5);
}
return 0;
}