Compile Error

foo.cc:23:1: error: '::main' must return 'int'
   23 | void main()
      | ^~~~
foo.cc:43:1: error: '::main' must return 'int'
   43 | void main()
      | ^~~~
foo.cc:43:6: error: redefinition of 'int main()'
   43 | void main()
      |      ^~~~
foo.cc:23:6: note: 'int main()' previously defined here
   23 | void main()
      |      ^~~~
foo.cc: In function 'int main()':
foo.cc:55:28: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
   55 |     printf("sum=%ld,Total=%d,Max=%d",sps,spn,spm);
      |                           ~^             ~~~
      |                            |             |
      |                            int           long int
      |                           %ld
foo.cc:55:35: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=]
   55 |     printf("sum=%ld,Total=%d,Max=%d",sps,spn,spm);
      |                                  ~^          ~~~
      |                                   |          |
      |                                   int        long int
      |                                  %ld
foo.cc: In function 'int main()':
foo.cc:27:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   27 | scanf("%d",&start);
      | ~~~~~^~~~~~~~~~~~~
foo.cc:29:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   29 | scanf("%d",&end);
      | ~~~~~^~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1101 A、B之间的超级素数
语言
C++
递交时间
2022-04-25 11:50:37
评测时间
2022-04-25 11:50:37
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes