結果
問題 |
No.2728 Grid Expansion
|
ユーザー |
![]() |
提出日時 | 2025-03-27 18:00:28 |
言語 | C (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 549 bytes |
コンパイル時間 | 382 ms |
コンパイル使用メモリ | 25,728 KB |
実行使用メモリ | 16,320 KB |
最終ジャッジ日時 | 2025-03-27 18:00:36 |
合計ジャッジ時間 | 6,864 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | TLE * 1 -- * 2 |
other | -- * 15 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d %d",&n,&k); | ^~~~~~~~~~~~~~~~~~~~ main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%s",pattern[i]); | ^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <string.h> void main(void){ int n,k; scanf("%d %d",&n,&k); char pattern[n*k][15] = {}; for(int i = 0 ; i < n*k ; i+k){ scanf("%s",pattern[i]); for(int j = 1;j < k-1 ; j++){ strcpy(pattern[i+j],pattern[i]); } } for(int i = 0 ; i < n*k ; i++){ for(int j = 0 ; j < n ; j++ ){ int count = 0; while(count < k){ printf("%c",pattern[i][j]); count++; } } printf("\n"); } }