编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#48567 #1007. G. 兼济天下 Compile Error 0 0 ms 0 K C / 448 B 18919534459 2021-05-15 12:05:52
显示原始代码
#include <stdio.h>
int main() {
    int T;
    double a[T][2];
    scanf("%d", &T);
    int i;
    for (i = 0; i < T; i++) {
        scanf("%lf %lf", &a[i][0], &a[i][1]);
    }
    for (i = 0; i < T; i++) {
        if (a[i][1] % (a[i][0] - 1) == 0) {
            printf("CSFNB!\n");
        } else {
            double c = a[i][1] % a([i][0] - 1) printf("%.6lf\n", (1 - c) * (a[i][0] - 2));
        }
    }
    return 0;
}

编译信息

/sandbox/1/a.c:14:19: error: invalid operands to binary expression ('double' and 'double')
        if(a[i][1]%(a[i][0]-1)==0)
           ~~~~~~~^~~~~~~~~~~~
/sandbox/1/a.c:20:32: error: expected expression
            double c=a[i][1]%a([i][0]-1)
                               ^
2 errors generated.