Compile Error
/in/foo.c: In function 'main': /in/foo.c:8:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation] for(int b=1;b<=n/3;b++); ^~~ /in/foo.c:9:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for' { ^ /in/foo.c:14:16: error: 'a' undeclared (first use in this function) if((n*n-2*a*n+1)%(a*(n-a))==0&&c>=b&&b>=a) ^ /in/foo.c:14:16: note: each undeclared identifier is reported only once for each function it appears in
代码
#include<stdio.h>
int main()
{
int n=0;
int num=0;
scanf("%d",&n);
for(int b=1;b<=n/3;b++);
{
for(int b=1;b<=n-2;b++)
{
for(int c=1;c<=n-2;c++)
{
if((n*n-2*a*n+1)%(a*(n-a))==0&&c>=b&&b>=a)
num++;
}
}
}
printf("%d",num);
return 0;
}
信息
- 递交者
- 类型
- 递交
- 题目
- P1003 hitwh 2019 新生赛 D Songer 的排兵布阵
- 语言
- C
- 递交时间
- 2020-12-23 17:52:09
- 评测时间
- 2020-12-23 17:52:09
- 评测机
- 分数
- 0
- 总耗时
- 0ms
- 峰值内存
- 0 Bytes