/ Vijos /

记录详情

Compile Error

foo.c: In function 'find':
foo.c:3:17: error: expected expression before 'int'
    3 | { int ans=1,i,t=int(sqrt(x);
      |                 ^~~
foo.c:4:19: error: expected statement before ')' token
    4 |  for(i=2;i<=t;i++))
      |                   ^
foo.c: In function 'main':
foo.c:12:3: error: 'p' undeclared (first use in this function)
   12 |  {p= find(i);
      |   ^
foo.c:12:3: note: each undeclared identifier is reported only once for each function it appears in
foo.c:13:27: error: 'ans' undeclared (first use in this function)
   13 |  if (p>i){if (find(p)==i) ans++;}}
      |                           ^~~
foo.c:10:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   10 |  scanf("%d %d",&a,&b);
      |  ^~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1216 亲和数
语言
C
递交时间
2022-03-08 19:33:58
评测时间
2022-03-08 19:33:58
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes