#3316
Se dau n numere naturale nenule şi se notează cu P produsul acestora. Să se afle numerele prime din descompunerea lui P în factori primi, precum şi exponentul acestora.
NeuroN
| Problema | Eratostene5 | Operații I/O |
eratostene5.in/eratostene5.out
|
|---|---|---|---|
| Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #65011469 | Utilizator | |
| Fișier | eratostene5.cpp | Dimensiune | 1.07 KB |
| Data încărcării | 14 Iulie 2026, 00:03 | Scor/rezultat | 100 puncte |
eratostene5.cpp: In function ‘void ciur()’: eratostene5.cpp:30:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 30 | for(int i = 0; i < prim.size(); i++) | ~~^~~~~~~~~~~~~ eratostene5.cpp: In function ‘void exp(int)’: eratostene5.cpp:36:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 36 | while(i < prim.size() && 1ll * prim[i]*prim[i] <= x) | ~~^~~~~~~~~~~~~ eratostene5.cpp:35:23: warning: unused variable ‘r’ [-Wunused-variable] 35 | int i = 0, e, r = 1; | ^ eratostene5.cpp: In function ‘int main()’: eratostene5.cpp:60:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 60 | for(int i = 0; i < prim.size(); i++) | ~~^~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.006 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.007 secunde | OK. | 12 | 12 | ||
| 3 | 0.017 secunde | OK. | 18 | 18 | ||
| 4 | 0.034 secunde | OK. | 17 | 17 | ||
| 5 | 0.038 secunde | OK. | 16 | 16 | ||
| 6 | 0.142 secunde | OK. | 17 | 17 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Eratostene5 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ă.