编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#25607 #1141. ddd和鸵鸟 Compile Error 0 0 ms 0 K C / 238 B 经济99-刘雨泽 2020-05-29 11:12:18
显示原始代码
#include <stdio.h>
int main() {
    int n;
    scanf_s("%d", &n);
    long int sum = 0;
    int q;
    while (n > 0) {
        scanf_s("%d", &q);
        sum += q;
        n--;
    }
    if (sum % 2 == 0)
        printf("ddd");
    else
        printf("bqp");
    return 0;
}

编译信息

/sandbox/1/a.c:5:2: warning: implicit declaration of function 'scanf_s' is invalid in C99 [-Wimplicit-function-declaration]
        scanf_s("%d", &n);
        ^
1 warning generated.
/tmp/a-843c07.o: In function `main':
a.c:(.text+0xd): undefined reference to `scanf_s'
a.c:(.text+0x2a): undefined reference to `scanf_s'
clang: error: linker command failed with exit code 1 (use -v to see invocation)