记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:11:12: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long int *' [-Wformat=]
    scanf("%d",&n);
            ^
/in/foo.c:13:7: error: invalid type argument of unary '*' (have 'long int')
     a=*i;
       ^~
/in/foo.c:14:20: error: expected expression before '%' token
     if((x*s+l)*y*y)%a==0) count++;
                    ^
/in/foo.c:14:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if((x*s+l)*y*y)%a==0) count++;
     ^~
/in/foo.c:14:25: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     if((x*s+l)*y*y)%a==0) count++;
                         ^
/in/foo.c:14:25: error: expected statement before ')' token
/in/foo.c:16:13: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
    printf("%d",count);
             ^
/in/foo.c:5:25: warning: variable 'a' set but not used [-Wunused-but-set-variable]
    long int i,n,x,y,l,s,a=1,count=0;
                         ^

信息

递交者
类型
递交
题目
P1186 人生苦短
比赛
2020年互联网创新创业科技节程序设计大赛
语言
C
递交时间
2020-12-09 14:40:44
评测时间
2020-12-09 14:40:44
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes