#1931
Fantastice
Definim un număr ca fiind fantastic dacă numărul de numere la care acesta se împarte exact este un număr prim.
Dându-se un șir cu n
numere întregi strict pozitive, să se afișeze numărul de numere fantastice din șir.
Moisil++, 2016
Problema | Fantastice | Operații I/O |
fantastice.in /fantastice.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 16 MB
/
Stivă 8 MB
|
Id soluție | #14112782 | Utilizator | |
Fișier | fantastice.cpp | Dimensiune | 535 B |
Data încărcării | 21 Februarie 2019, 17:07 | Scor / rezultat | Eroare de compilare |
fantastice.cpp:1:1: error: 'include' does not name a type include <iostream> ^ fantastice.cpp:3:1: error: 'ifstream' does not name a type ifstream in(" fantastice.in") ^ fantastice.cpp: In function 'int min()': fantastice.cpp:37:1: error: 'in' was not declared in this scope in>>n; ^ fantastice.cpp:41:10: error: 'nrdiv' was not declared in this scope d=nrdiv(x); ^ fantastice.cpp:42:10: error: 'prim' was not declared in this scope if(prim(d)) ^ fantastice.cpp:45:1: error: 'out' was not declared in this scope out<<fan ^ fantastice.cpp:45:6: error: expected ';' at end of input out<<fan ^ fantastice.cpp:45:6: error: expected '}' at end of input fantastice.cpp:45:6: warning: no return statement in function returning non-void [-Wreturn-type]
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Fantastice 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ă.