0_0_39841038_21052.cpp:12:32: error: 'vector' does not name a type
12 | long long findLCM(int n, const vector<int>& numbers) {
| ^~~~~~
0_0_39841038_21052.cpp:12:38: error: expected ',' or '...' before '<' token
12 | long long findLCM(int n, const vector<int>& numbers) {
| ^
0_0_39841038_21052.cpp: In function 'long long int findLCM(int, int)':
0_0_39841038_21052.cpp:13:36: error: expected primary-expression before '[' token
13 | long long current_lcm = numbers[0];
| ^
0_0_39841038_21052.cpp:15:47: error: expected primary-expression before '[' token
15 | current_lcm = lcm(current_lcm, numbers[i]);
| ^
0_0_39841038_21052.cpp: In function 'int main()':
0_0_39841038_21052.cpp:23:9: error: 'vector' was not declared in this scope
23 | vector<int> numbers(n);
| ^~~~~~
0_0_39841038_21052.cpp:3:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
2 | #include <numeric> // std::gcd 函数所在的头文件
+++ |+#include <vector>
3 |
0_0_39841038_21052.cpp:23:16: error: expected primary-expression before 'int'
23 | vector<int> numbers(n);
| ^~~
0_0_39841038_21052.cpp:25:27: error: expected primary-expression before '[' token
25 | cin >> numbers[i]; // 读取每个测试实例中的数字
| ^
0_0_39841038_21052.cpp:29:35: error: expected primary-expression before ')' token
29 | cout << findLCM(n, numbers) << endl;
| ^
|