#201
SubmDiv
Să se determine toate submulţimile cu m
elemente ale mulţimii divizorilor unui număr natural dat.
Problema | SubmDiv | Operații I/O |
submdiv.in /submdiv.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53974971 | Utilizator | |
Fișier | submdiv.cpp | Dimensiune | 607 B |
Data încărcării | 16 Noiembrie 2024, 13:57 | Scor / rezultat | Eroare de compilare |
submdiv.cpp:7:14: error: expected unqualified-id before ',' token int x[7], m, , div[100], nrdiv; ^ submdiv.cpp:7:23: error: 'int div [100]' redeclared as different kind of symbol int x[7], m, , div[100], nrdiv; ^ 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 submdiv.cpp:1: /usr/include/stdlib.h:789:14: error: previous declaration of 'div_t div(int, int)' extern div_t div (int __numer, int __denom) ^ submdiv.cpp: In function 'void tiparire()': submdiv.cpp:11:25: error: invalid types '<unresolved overloaded function type>[int]' for array subscript cout << div[x[i]] << " "; ^ submdiv.cpp: In function 'void divi()': submdiv.cpp:26:22: error: 'n' was not declared in this scope for (int d=1; d<=n; d++) ^ submdiv.cpp:29:9: error: 'divn' was not declared in this scope divn[nrdiv]=d; ^ submdiv.cpp: In function 'int main()': submdiv.cpp:36:12: error: 'n' was not declared in this scope cin >> n >> m; ^ submdiv.cpp:39:9: error: expected ';' before 'return' return 0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SubmDiv 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ă.