結果

問題 No.597 concat
ユーザー iwltwm
提出日時 2018-01-03 20:57:36
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 285 bytes
コンパイル時間 1,402 ms
コンパイル使用メモリ 22,656 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-23 02:26:55
合計ジャッジ時間 869 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:15:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |         scanf("%d",&N);
      |         ~~~~~^~~~~~~~~
main.cpp:19:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   19 |                 scanf("%s",b);
      |                 ~~~~~^~~~~~~~

ソースコード

diff #

/*
 *No.597
 */
#include <stdio.h>
#include <string.h>

int main(void)
{
	int N,i;
	char a[201];
	
	for (i=0;i<20;i++)
		a[i]='\0';
	
	scanf("%d",&N);
	
	for (i=0;i<N;i++) {
		char b[20];
		scanf("%s",b);
		strcat(a,b);
	}
	
	printf("\n%s\n",a);
	
	return 0;
}
0