#60
Să se scrie un program care să verificе dacă două numere naturale citite de la tastatură sunt prime între ele.
| Problema | PrimeIntreEle | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64830675 | Utilizator | |
| Fișier | primeintreele.cpp | Dimensiune | 316 B |
| Data încărcării | 04 Iunie 2026, 12:08 | Scor/rezultat | 0 puncte |
In file included from /usr/include/c++/13/iostream:41, from primeintreele.cpp:1: In member function ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>]’, inlined from ‘int main()’ at primeintreele.cpp:15:19: /usr/include/c++/13/ostream:204:25: warning: ‘PIE’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ primeintreele.cpp: In function ‘int main()’: primeintreele.cpp:6:18: note: ‘PIE’ was declared here 6 | { long long a,b, PIE,NOPIE; | ^~~ In member function ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>]’, inlined from ‘int main()’ at primeintreele.cpp:17:23: /usr/include/c++/13/ostream:204:25: warning: ‘NOPIE’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ primeintreele.cpp: In function ‘int main()’: primeintreele.cpp:6:22: note: ‘NOPIE’ was declared here 6 | { long long a,b, PIE,NOPIE; | ^~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 3 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 6 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| 8 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 10 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PrimeIntreEle 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ă.