题解 | #序列重组矩阵#
序列重组矩阵
https://www.nowcoder.com/practice/7548f8f5e44c42fa84fb2323d899a966
#include <stdio.h> int main() { int n,m = 0; scanf("%d%d",&n,&m); int arr[1000]; int i,j = 0; for(i=0;i<(m*n);i++) { scanf("%d",&arr[i]); } for(i=0;i<(m*n);i++) { printf("%d ",arr[i]); if((i+1)%m==0) { printf("\n"); } } return 0; }