#4871
Se dă un șir de n numere naturale. Pentru fiecare din numerele din șir trebuie să afișați următorul număr natural, strict mai mare, care este prim.
| Problema | NextPrime | Operații I/O |
nextprime.in/nextprime.out
|
|---|---|---|---|
| Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64824307 | Utilizator | |
| Fișier | nextprime.cpp | Dimensiune | 826 B |
| Data încărcării | 03 Iunie 2026, 20:55 | Scor/rezultat | 75 puncte |
nextprime.cpp: In function ‘int main()’: nextprime.cpp:43:17: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] 43 | while (func(k) == false) | ^~~~~ nextprime.cpp:45:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’ 45 | cout << k << "\n"; | ^~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 0 | 0.01 secunde | Raspuns gresit. | 5 | 0 | ||
| 1 | 0.005 secunde | OK. | 5 | 5 | ||
| 2 | 0.011 secunde | OK. | 5 | 5 | ||
| 3 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 4 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 5 | 0.006 secunde | OK. | 5 | 5 | ||
| 6 | 0.006 secunde | OK. | 5 | 5 | ||
| 7 | 0.027 secunde | OK. | 5 | 5 | ||
| 8 | 0.022 secunde | OK. | 5 | 5 | ||
| 9 | 0.052 secunde | OK. | 5 | 5 | ||
| 10 | 0.062 secunde | OK. | 5 | 5 | ||
| 11 | 0.055 secunde | OK. | 5 | 5 | ||
| 12 | 0.06 secunde | OK. | 10 | 10 | ||
| 13 | 0.068 secunde | OK. | 10 | 10 | ||
| 14 | 0.054 secunde | OK. | 10 | 10 | ||
| 15 | 0.006 secunde | Caught fatal signal 8 | 10 | 0 | ||
| Punctaj total | 75 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NextPrime 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ă.