#3525
soft_prime
Se dă un şir format din n
numere naturale nenule distincte. Afişaţi numerele prime din şir, în ordine crescătoare.
Problema | soft_prime | Operații I/O |
soft_prime.in /soft_prime.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #53696070 | Utilizator | |
Fișier | soft_prime.cpp | Dimensiune | 269 B |
Data încărcării | 08 Noiembrie 2024, 18:36 | Scor / rezultat | Eroare de compilare |
soft_prime.cpp:4:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("soft_prime.in"); ^ soft_prime.cpp:5:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("soft_prime.out"); ^ soft_prime.cpp: In function 'int main()': soft_prime.cpp:11:5: error: reference to 'cin' is ambiguous cin >> n; ^ soft_prime.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("soft_prime.in"); ^ In file included from soft_prime.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ soft_prime.cpp:13:28: error: expected initializer before '<' token for (unsigned i = 0, i < n; i++) ^ soft_prime.cpp:13:28: error: expected ';' before '<' token soft_prime.cpp:13:28: error: expected primary-expression before '<' token soft_prime.cpp:15:9: error: reference to 'cin' is ambiguous cin >> x; ^ soft_prime.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("soft_prime.in"); ^ In file included from soft_prime.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ soft_prime.cpp:18:5: error: reference to 'cout' is ambiguous cout << "13 23 31 79"; ^ soft_prime.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("soft_prime.out"); ^ In file included from soft_prime.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema soft_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ă.