#include <stdio.h>
void printPatternNonRecursively(int n) {
for (int i = 1; i <= n; i++) {
for (int j = 0; j < i; j++) {
printf("%d ", i);
}
printf("\n");
}
}
int main() {
int num;
printf("输入要打印的行数:");
scanf("%d", &num);
printPatternNonRecursively(num);
return 0;
}