結果
問題 |
No.597 concat
|
ユーザー |
![]() |
提出日時 | 2025-03-10 15:13:29 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 222 bytes |
コンパイル時間 | 378 ms |
コンパイル使用メモリ | 25,088 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-10 15:13:30 |
合計ジャッジ時間 | 1,306 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d",&n); | ^~~~~~~~~~~~~~ main.c:9:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%s",str); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <string.h> void main(void){ int n = 0; scanf("%d",&n); char str[100] = "a"; char ans[10000] = ""; for(int i = 0 ; i < n ; i++){ scanf("%s",str); strcat(ans,str); } printf("%s",ans); }