View Code of Problem 3926

#include<stdio.h>
#include<math.h>
#include<string.h>
//#include<algorithm>
//#include <bits/stdc++.h>

using namespace std;

int main() {
	int n,m,a,b;
	scanf("%d %d %d %d",&n,&m,&a,&b);
	int i,j,z,x;
	int num[12][12];
	char  temp[100];
	for(i=0; i<n; i++) {
		scanf("%s",temp);
		for(j=0; j<m; j++) {
			num[i][j]=temp[j]-'0';
		}
	}

	for(i=0; i<n; i++) {
		for(j=0; j<a; j++) {
			for(z=0; z<m; z++) {
				for(x=0; x<b; x++) {
					printf("%d",num[i][z]);
				}
			}
			printf("\n");
		}
	}
}

Double click to view unformatted code.


Back to problem 3926