Problem | pushups |
---|---|
User | jerrielchangjiebin |
Submission Time | 2025-02-10 17:06:49 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
pushups.cpp: In function ‘long long int calculate(int)’:
pushups.cpp:7:6: error: expected ‘(’ before ‘x’
7 | if x%i == 0{
| ^
| (
pushups.cpp: In function ‘int main()’:
pushups.cpp:24:25: error: no match for ‘operator=’ (operand types are ‘std::vector<int>’ and ‘long long int’)
24 | ans = calculate(arr[i]);
| ^
In file included from /usr/include/c++/9/vector:72,
from pushups.cpp:2:
/usr/include/c++/9/bits/vector.tcc:198:5: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]’
198 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/vector.tcc:199:42: note: no known conversion for argument 1 from ‘long long int’ to ‘const std::vector<int>&’
199 | operator=(const vector<_Tp,