#3502
hard_prime
Se dau n
numere naturale. Să se afișeze toate numerele prime distincte dintre acestea in ordine crescătoare.
Problema | hard_prime | Operații I/O |
hard_prime.in /hard_prime.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 0.2 MB
/
Stivă 0.2 MB
|
Id soluție | #50705996 | Utilizator | |
Fișier | hard_prime.cpp | Dimensiune | 1.18 KB |
Data încărcării | 23 Aprilie 2024, 11:36 | Scor / rezultat | 0 puncte |
hard_prime.cpp:29:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] main() ^ hard_prime.cpp: In function 'int main()': hard_prime.cpp:40:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (x>v[c-1]) {v[c]=x; c++;} ^ hard_prime.cpp:41:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] else if (x<v[c-1]) ^ hard_prime.cpp:48:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (v[(dr+st)/2]==x) ^ hard_prime.cpp:53:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] else if (v[(dr+st)/2]>x) ^ hard_prime.cpp:63:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (v[dr]<x) ^ hard_prime.cpp:69:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] else if (v[dr]>x) ^ hard_prime.cpp:31:20: warning: unused variable 'cop' [-Wunused-variable] int n, i, x, c=1, cop, dr, st, locul; ^ hard_prime.cpp:31:33: warning: variable 'locul' set but not used [-Wunused-but-set-variable] int n, i, x, c=1, cop, dr, st, locul; ^ hard_prime.cpp:32:7: warning: variable 's' set but not used [-Wunused-but-set-variable] bool s; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 5 | 0 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 15 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema hard_prime 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ă.