Compile Error

foo.cc: In function ‘int main()’:
foo.cc:9:33: error: expected initializer before ‘==’ token
    9 |                 int ok=1,num[10]=={0,0,0,0,0,0,0,0,0,0},it=i;
      |                                 ^~
foo.cc:9:56: error: expected primary-expression before ‘,’ token
    9 |                 int ok=1,num[10]=={0,0,0,0,0,0,0,0,0,0},it=i;
      |                                                        ^
foo.cc:9:57: error: ‘it’ was not declared in this scope; did you mean ‘i’?
    9 |                 int ok=1,num[10]=={0,0,0,0,0,0,0,0,0,0},it=i;
      |                                                         ^~
      |                                                         i
foo.cc:12:25: error: ‘num’ was not declared in this scope; did you mean ‘enum’?
   12 |                         num[it%10]++;
      |                         ^~~
      |                         enum
foo.cc:21:14: error: expected primary-expression before ‘,’ token
   21 |         cout<,ans;
      |              ^

信息

递交者
类型
递交
题目
P3117 幸运数字 2026信息与未来T1
语言
C++
递交时间
2026-07-17 21:04:18
评测时间
2026-07-17 21:04:18
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes