結果
問題 |
No.597 concat
|
ユーザー |
![]() |
提出日時 | 2018-02-16 20:09:59 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 298 bytes |
コンパイル時間 | 1,552 ms |
コンパイル使用メモリ | 20,864 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-13 03:13:10 |
合計ジャッジ時間 | 1,988 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 2 WA * 9 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d",&n); | ^~~~~~~~~~~~~~ main.c:13:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%s",s[i]); | ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <string.h> int main(void) { int n; char s[20][21]; int i; char s2[2000]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s",s[i]); //printf("!%d\n",i); } strcat(s2,s[0]); for(i=1;i<n;i++){ strcat(s2,s[i]); } printf("%s\n",s2); return 0; }