[题解] 放大打印机

· · 个人记录

/*
最美の四重循环
*/
#include <bits/stdc++.h>
using namespace std;
int main(){
    int x, y, nx, ny;
    cin >> x >> y >> nx >> ny;
    char s[55][55];
    for (int i = 1; i <= x; i++){
        for (int j = 1; j <= y; j++){
            cin >> s[i][j];
        }
    }
    for (int i = 1; i <= x; i++){
        for (int j = 1; j <= nx; j++){
            for (int k = 1; k <= y; k++){
                for (int l = 1; l <= ny; l++){
                    cout << s[i][k];
                }
            }
            if (j != nx) cout << endl; 
        }
        if (i != x) cout << endl;
    }
    return 0;
}