結果
問題 | No.2728 Grid Expansion |
ユーザー |
|
提出日時 | 2024-07-09 22:50:56 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 631 bytes |
コンパイル時間 | 310 ms |
コンパイル使用メモリ | 30,208 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-09 22:50:58 |
合計ジャッジ時間 | 1,631 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 |
ソースコード
#include <stdio.h>int main(void) {int N, K;scanf("%d %d", &N, &K);char a[N][N];char b[N*K][N*K];// Read the NxN gridfor (int i = 0; i < N; i++) {for (int j = 0; j < N; j++) {scanf(" %c", &a[i][j]);}}// Expand the gridfor (int i = 0; i < N * K; i++) {for (int j = 0; j < N * K; j++) {b[i][j] = a[i / K][j / K];}}// Print the expanded gridfor (int i = 0; i < N * K; i++) {for (int j = 0; j < N * K; j++) {printf("%c", b[i][j]);}printf("\n");}return 0;}