Borderou de evaluare (job #2517471)
Utilizator | Data | 3 ianuarie 2020 16:59:11 | |
---|---|---|---|
Problema | Armonica | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:9:24: error: 'std::vector<long long int> div' redeclared as different kind of symbol
std::vector<long long> div;
^~~
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/ext/string_conversions.h:41,
from /usr/include/c++/6/bits/basic_string.h:5420,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from main.cpp:1:
/usr/include/stdlib.h:788:14: note: previous declaration 'div_t div(int, int)'
extern div_t div (int __numer, int __denom)
^~~
main.cpp: In function 'int main()':
main.cpp:24:11: error: request for member 'push_back' in 'div', which is of non-class type 'div_t(int, int) throw ()'
div.push_back(i);
^~~~~~~~~
main.cpp:26:13: error: request for member 'push_back' in 'div', which is of non-class type 'div_t(int, int) throw ()'
div.push_back(b / i);
^~~~~~~~~
main.cpp:28:36: error: request for member 'size' in 'div', which is of non-class type 'div_t(int, int) throw ()'
for (unsigned int i = 0; i < div.size(); i++)
^~~~
main.cpp:29:38: error: request for member 'size' in 'div', which is of non-class type 'div_t(int, int) throw ()'
for (unsigned int j = i; j < div.size(); j++) {
^~~~
main.cpp:30:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if ((b * b) % (div[i] * div[j]) == 0) {
^
main.cpp:30:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if ((b * b) % (div[i] * div[j]) == 0) {
^
main.cpp:30:29: error: invalid operands of types 'div_t(int, int) throw ()' and 'div_t(int, int) throw ()' to binary 'operator*'
if ((b * b) % (div[i] * div[j]) == 0) {
~~~~~~~^~~~~~~~
main.cpp:31:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
long long u = div[i] * div[j];
^
main.cpp:31:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
long long u = div[i] * div[j];
^
main.cpp:31:30: error: invalid operands of types 'div_t(int, int) throw ()' and 'div_t(int, int) throw ()' to binary 'operator*'
long long u = div[i] * div[j];
~~~~~~~^~~~~~~~
main.cpp:32:39: warning: pointer to a function used in arithmetic [-Wpointer-arith]
long long v = (b * b) / (div[i] * div[j]);
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !