#3218
nrdiv1
Se consideră o secvență de N
numere naturale nenule. Determinați numărul de divizori pentru fiecare număr din secvența dată.
Olimpiada Municipală Iași, clasa a IX-a
Problema | nrdiv1 | Operații I/O |
nrdiv.in /nrdiv.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 11 MB
/
Stivă 1 MB
|
Id soluție | #48263735 | Utilizator | |
Fișier | nrdiv1.cpp | Dimensiune | 413 B |
Data încărcării | 20 Ianuarie 2024, 10:06 | Scor / rezultat | Eroare de compilare |
nrdiv1.cpp: In function 'int main()': nrdiv1.cpp:20:5: error: invalid user-defined conversion from 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'int' [-fpermissive] cin >> a; ^ In file included from /usr/include/c++/4.8/ios:44:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from nrdiv1.cpp:1: /usr/include/c++/4.8/bits/basic_ios.h:115:7: note: candidate is: std::basic_ios<_CharT, _Traits>::operator void*() const [with _CharT = char; _Traits = std::char_traits<char>] <near match> operator void*() const ^ /usr/include/c++/4.8/bits/basic_ios.h:115:7: note: no known conversion for implicit 'this' parameter from 'void*' to 'int' nrdiv1.cpp:17:6: error: expected primary-expression before 'int' for (int ^ nrdiv1.cpp:17:6: error: expected ';' before 'int' nrdiv1.cpp:31:9: error: expected primary-expression at end of input return 0; ^ nrdiv1.cpp:31:9: error: expected ';' at end of input nrdiv1.cpp:31:9: error: expected primary-expression at end of input nrdiv1.cpp:31:9: error: expected ')' at end of input nrdiv1.cpp:31:9: error: expected statement at end of input nrdiv1.cpp:11:11: warning: unused variable 'nrdiv' [-Wunused-variable] int n, a, nrdiv = 0; ^ nrdiv1.cpp:31:9: error: expected '}' at end of input return 0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema nrdiv1 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ă.