#4918: 一直RE...不解


alopex_ (碰碰!這是什麼!)


#include <stdio.h>
void test(int *p);

int main(){
char i,j;
int p[101];
test(p);
while(scanf("%d",&j)!=EOF){
printf("%d\n",p[j]);
}
return 0;
}
void test(int *p){
     char i,j;
int ans = 0,t[51] = {1,2};
     for(j=1;j<=100;j++){
for(i=0;i<50;i++){
ans += t[i];
if(i>=1)t[i+1] = t[i] - t[i-1] + t[i] + j ;
}
p[j] = ans;
ans = 0;
}
}
 
 
 
=__=