結果

問題 No.597 concat
ユーザー Haijinn
提出日時 2018-02-01 17:47:51
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 315 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 22,912 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-31 00:20:44
合計ジャッジ時間 724 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |         scanf("%d",&n);
      |         ^~~~~~~~~~~~~~
main.c:14:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   14 |                 scanf("%s",s[i]);
      |                 ^~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>
#include <math.h>
#include <string.h>
int main(void)
{
	int n;
	char s[11][21];
	int i;
	char s2[200];
	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;
}
0