1 #include<stdio.h> 2 int main() 3 { 4 int n,m,t,i; 5 scanf("%d",&n); 6 while(n--) 7 { 8 scanf("%d",&m); 9 for(i=0,t=1; i<m/2; i++,t+=2) 10 { 11 if(i) 12 printf(" "); 13 printf("%d",t); 14 } 15 printf("\n"); 16 for(i=0,t=2; i<m/2; i++,t+=2) 17 { 18 if(i) 19 printf(" "); 20 printf("%d",t); 21 } 22 printf("\n\n"); 23 } 24 return 0; 25 }
时间: 2024-12-15 01:35:12