Borderou de evaluare (job #1687219)

Utilizator ancabdBadiu Anca ancabd Data 12 aprilie 2016 18:45:05
Problema Suma si numarul divizorilor Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:9:38: error: ‘long long int div’ redeclared as different kind of symbol long long nrt, a, nrdiv=1, sumdiv=1, div, exp1; ^ In file included from /usr/include/c++/4.8/cstdlib:72:0, from /usr/include/c++/4.8/ext/string_conversions.h:41, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from user.cpp:1: /usr/include/stdlib.h:785:14: error: previous declaration of ‘div_t div(int, int)’ extern div_t div (int __numer, int __denom) ^ user.cpp: In function ‘int main()’: user.cpp:16:13: error: overloaded function with no contextual type information div = 2; ^ user.cpp:22:23: error: invalid operands of types ‘long long int’ and ‘<unresolved overloaded function type>’ to binary ‘operator%’ while (a% div == 0 && a > 1){a = a/div; exp1++;} ^ user.cpp:22:48: error: invalid operands of types ‘long long int’ and ‘<unresolved overloaded function type>’ to binary ‘operator/’ while (a% div == 0 && a > 1){a = a/div; exp1++;} ^ user.cpp:24:38: error: no matching function for call to ‘pow(<unresolved overloaded function type>, long long int)’ sumdiv*=((pow(div, exp1+1)-1)/(div-1)); ^ user.cpp:24:38: note: candidates are: In file included from /usr/include/features.h:357:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:420, from /usr/include/c++/4.8/iosfwd:38, from /usr/include/c++/4.8/ios:38, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from user.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:155:1: note: double pow(double, double) __MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y)); ^ /usr/include/i386-linux-gnu/bits/mathcalls.h:155:1: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘double’ In file included from user.cpp:2:0: /usr/include/c++/4.8/cmath:434:5: note: template<class _Tp, class _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type std::pow(_Tp, _Up) pow(_Tp __x, _Up __y) ^ /usr/include/c++/4.8/cmath:434:5: note: template argument deduction/substitution failed: user.cpp:24:38: note: couldn't deduce template parameter ‘_Tp’ sumdiv*=((pow(div, exp1+1)-1)/(div-1)); ^

Ceva nu functioneaza?