#268
DivK
Se dau n
numere naturale şi un număr natural k
. Afişaţi acele numere date care au cel puţin k
divizori.
Variante Bacalaureat 2009
Problema | DivK | Operații I/O |
divk.in /divk.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53590850 | Utilizator | |
Fișier | divk.cpp | Dimensiune | 394 B |
Data încărcării | 05 Noiembrie 2024, 22:05 | Scor / rezultat | Eroare de compilare |
divk.cpp: In function 'int main()': divk.cpp:6:5: error: 'ifstream' was not declared in this scope ifstream f("divk.in"); ^ divk.cpp:6:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from divk.cpp:1: /usr/include/c++/4.8/iosfwd:157:34: note: 'std::ifstream' typedef basic_ifstream<char> ifstream; ^ divk.cpp:6:14: error: expected ';' before 'f' ifstream f("divk.in"); ^ divk.cpp:7:5: error: 'ofstream' was not declared in this scope ofstream g("divk.out"); ^ divk.cpp:7:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from divk.cpp:1: /usr/include/c++/4.8/iosfwd:160:34: note: 'std::ofstream' typedef basic_ofstream<char> ofstream; ^ divk.cpp:7:14: error: expected ';' before 'g' ofstream g("divk.out"); ^ divk.cpp:9:5: error: 'f' was not declared in this scope f>>n>>k; ^ divk.cpp:10:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ divk.cpp:18:18: error: 'g' was not declared in this scope if(c>=k) g<<x; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema DivK 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ă.