Se citește un număr natural n
. Să se determine suma divizorilor impari ai săi.
Problema | Suma Divizorilor Impari | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54024308 | Utilizator | |
Fișier | suma_divizorilor_impari.cpp | Dimensiune | 296 B |
Data încărcării | 18 Noiembrie 2024, 10:20 | Scor / rezultat | Eroare de compilare |
suma_divizorilor_impari.cpp: In function 'int main()': suma_divizorilor_impari.cpp:9:8: error: ambiguous overload for 'operator>>' (operand types are 'std::istream {aka std::basic_istream<char>}' and 'int') cin>>0; ^ suma_divizorilor_impari.cpp:9:8: note: candidates are: In file included from /usr/include/c++/4.8/sstream:38:0, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from suma_divizorilor_impari.cpp:1: /usr/include/c++/4.8/istream:120:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__istream_type& (*)(std::basic_istream<_CharT, _Traits>::__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>] operator>>(__istream_type& (*__pf)(__istream_type&)) ^ /usr/include/c++/4.8/istream:124:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__ios_type& (*)(std::basic_istream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::__ios_type = std::basic_ios<char>] operator>>(__ios_type& (*__pf)(__ios_type&)) ^ /usr/include/c++/4.8/istream:131:7: note: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>] operator>>(ios_base& (*__pf)(ios_base&)) ^ /usr/include/c++/4.8/istream:259:7: note: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>] operator>>(__streambuf_type* __sb); ^ /usr/include/c++/4.8/istream:774:5: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char*) [with _Traits = std::char_traits<char>] operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) ^ /usr/include/c++/4.8/istream:779:5: note: std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char*) [with _Traits = std::char_traits<char>] operator>>(basic_istream<char, _Traits>& __in, signed char* __s) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Suma Divizorilor Impari face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.