結果
| 問題 |
No.597 concat
|
| コンテスト | |
| ユーザー |
Haijinn
|
| 提出日時 | 2018-02-16 19:08:55 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 298 bytes |
| コンパイル時間 | 114 ms |
| コンパイル使用メモリ | 20,992 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-12 23:49:35 |
| 合計ジャッジ時間 | 695 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 1 WA * 10 |
コンパイルメッセージ
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;
}
Haijinn