結果
| 問題 |
No.2728 Grid Expansion
|
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2024-04-30 15:34:22 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 497 bytes |
| コンパイル時間 | 239 ms |
| コンパイル使用メモリ | 40,188 KB |
| 最終ジャッジ日時 | 2025-02-21 09:53:41 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:23:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
23 | scanf("%d%d", &n, &k);
| ~~~~~^~~~~~~~~~~~~~~~
main.cpp:24:36: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
24 | for (int i = 0; i < n; i++) scanf("%s", as[i]);
| ~~~~~^~~~~~~~~~~~~
ソースコード
/* -*- coding: utf-8 -*-
*
* 2728.cc: No.2728 Grid Expansion - yukicoder
*/
#include<cstdio>
#include<algorithm>
using namespace std;
/* constant */
const int MAX_N = 10;
/* global variables */
char as[MAX_N][MAX_N + 4];
/* main */
int main() {
int n, k;
scanf("%d%d", &n, &k);
for (int i = 0; i < n; i++) scanf("%s", as[i]);
int nk = n * k;
for (int i = 0; i < nk; i++) {
for (int j = 0; j < nk; j++) putchar(as[i / k][j / k]);
putchar('\n');
}
return 0;
}
tnakao0123