Problem statement said:
But there isn't blank line after last case in judge output.Print a blank line after each case.
Moderator: Board moderators
But there isn't blank line after last case in judge output.Print a blank line after each case.
Code: Select all
...
typedef struct{
int _[64][64];
}t_matrix;
int dim;
void print_matrix(t_matrix *m){
int i,j;
for(i=0;i<dim;i++){
printf("%d",m->_[i][0]);
for(j=1;j<dim;j++) printf(" %d",m->_[i][j]);
printf("\n");
}
printf("\n");
}
...
Code: Select all
int main()
{
int t=0;
while(2==scanf("%d%d",&N,&k))
{
if (!N && !k) break;
if(t++) puts("");
Test();
}
return 0;
}
Your input checks for both n and k to be 0, so it's not completely right. Both input and output look ok.Input is terminated by a case where n = 0. This case need NOT be processed.