#include<stdio.h> int main() { int i,j, k = 1,m,n; scanf("%d%d", &m,&n); for (i = 1;i <= m;i++) { for (j = 1;j <= i;j++) { printf("%2d ", k); k++; } printf("\n"); } printf("\n"); k = 1; for (i = 1;i <= m;i++) { for (j = 1;j <= n;j++) { printf("%2d ", k); k += 4; } printf("\n"); k -= 15; } printf("\n"); k = 1; for (i = 1;i <= m;i++) { for (j = 1;j <= n;j++) { printf("%2d ", k); k += 1; } printf("\n"); } return 0; }