Accepted

foo.c: In function 'main':
foo.c:24:28: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
         p = (char *)malloc(strlen(A) + strlen(B));
                            ^~~~~~
foo.c:24:28: warning: incompatible implicit declaration of built-in function 'strlen'
foo.c:24:28: note: include '<string.h>' or provide a declaration of 'strlen'
foo.c:25:9: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
         strcpy(p, B);
         ^~~~~~
foo.c:25:9: warning: incompatible implicit declaration of built-in function 'strcpy'
foo.c:25:9: note: include '<string.h>' or provide a declaration of 'strcpy'
foo.c:26:9: warning: implicit declaration of function 'strcat' [-Wimplicit-function-declaration]
         strcat(p, A);
         ^~~~~~
foo.c:26:9: warning: incompatible implicit declaration of built-in function 'strcat'
foo.c:26:9: note: include '<string.h>' or provide a declaration of 'strcat'
foo.c:12:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &n);
     ^~~~~~~~~~~~~~~
foo.c:17:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%s", s1);
     ^~~~~~~~~~~~~~~
foo.c:18:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%s", s2);
     ^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 1ms 280.0 KiB
#2 Accepted 1ms 292.0 KiB
#3 Accepted 1ms 412.0 KiB
#4 Accepted 1ms 384.0 KiB
#5 Accepted 1ms 256.0 KiB

信息

递交者
类型
递交
题目
P1083 2-2 语言的起点
语言
C
递交时间
2021-07-21 11:30:04
评测时间
2021-07-21 11:30:04
评测机
分数
100
总耗时
6ms
峰值内存
412.0 KiB