Compile Error

foo.cc:48:17: error: stray ‘#’ in program
   48 |         x /= 10;#include<bits/stdc++.h>
      |                 ^
foo.cc: In function ‘int chongzu_min(int)’:
foo.cc:48:18: error: ‘include’ was not declared in this scope
   48 |         x /= 10;#include<bits/stdc++.h>
      |                  ^~~~~~~
foo.cc:48:26: error: ‘bits’ was not declared in this scope
   48 |         x /= 10;#include<bits/stdc++.h>
      |                          ^~~~
foo.cc:48:31: error: ‘stdc’ was not declared in this scope; did you mean ‘std’?
   48 |         x /= 10;#include<bits/stdc++.h>
      |                               ^~~~
      |                               std
foo.cc:49:9: error: expected primary-expression before ‘using’
   49 |         using namespace std;
      |         ^~~~~
foo.cc:50:11: error: conflicting declaration ‘long long int a [1000000]’
   50 | long long a[1000000],i=2,b[1000000];
      |           ^
foo.cc:47:13: note: previous declaration as ‘int a’
   47 |         int a = x % 10;
      |             ^
foo.cc:51:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   51 | int main()
      |         ^~
foo.cc:51:9: note: remove parentheses to default-initialize a variable
   51 | int main()
      |         ^~
      |         --
foo.cc:51:9: note: or replace parentheses with braces to value-initialize a variable
foo.cc:52:1: error: a function-definition is not allowed here before ‘{’ token
   52 | {
      | ^
foo.cc:76:13: error: conflicting declaration ‘int b’
   76 |         int b = x % 10;
      |             ^
foo.cc:50:26: note: previous declaration as ‘long long int b [1000000]’
   50 | long long a[1000000],i=2,b[1000000];
      |                          ^
foo.cc:80:28: error: invalid operands of types ‘long long int [1000000]’ and ‘int’ to binary ‘operator*’
   80 |         n[0] = a * 100 + b * 10 + c;
      |                          ~ ^ ~~
      |                          |   |
      |                          |   int
      |                          long long int [1000000]
foo.cc:81:33: error: invalid conversion from ‘long long int*’ to ‘int’ [-fpermissive]
   81 |         n[1] = a * 100 + c * 10 + b;
      |                ~~~~~~~~~~~~~~~~~^~~
      |                                 |
      |                                 long long int*
foo.cc:82:18: error: invalid operands of types ‘long long int [1000000]’ and ‘int’ to binary ‘operator*’
   82 |         n[2] = b * 100 + a * 10 + c;
      |                ~ ^ ~~~
      |                |   |
      |                |   int
      |                long long int [1000000]
foo.cc:83:18: error: invalid operands of types ‘long long int [1000000]’ and ‘int’ to binary ‘operator*’
   83 |         n[3] = b * 100 + c * 10 + a;
      |                ~ ^ ~~~
      |                |   |
      |                |   int
      |                long long int [1000000]
foo.cc:84:33: error: invalid conversion from ‘long long int*’ to ‘int’ [-fpermissive]
   84 |         n[4] = c * 100 + a * 10 + b;
      |                ~~~~~~~~~~~~~~~~~^~~
      |                                 |
      |                                 long long int*
foo.cc:85:28: error: invalid operands of types ‘long long int [1000000]’ and ‘int’ to binary ‘operator*’
   85 |         n[5] = c * 100 + b * 10 + a;
      |                          ~ ^ ~~
      |                          |   |
      |                          |   int
      |                          long long int [1000000]
foo.cc:50:22: warning: unused variable ‘i’ [-Wunused-variable]
   50 | long long a[1000000],i=2,b[1000000];
      |                      ^

信息

递交者
类型
递交
题目
5-5 统计素数因子
语言
C++
递交时间
2025-08-13 20:33:18
评测时间
2025-08-13 20:33:18
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes