#2422
Se citesc mai multe numere naturale nenule. Fiecare astfel de număr X se va afișa, urmat de un triplet de numere a b c cu proprietatea că a+b+c=X, iar produsul lor este maxim.
| Problema | ProdusMaxim | Operații I/O |
produsmaxim.in/produsmaxim.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0 MB
|
| Id soluție | #64077745 | Utilizator | |
| Fișier | produsmaxim.cpp | Dimensiune | 622 B |
| Data încărcării | 15 Aprilie 2026, 20:57 | Scor/rezultat | 0 puncte |
In file included from /usr/include/c++/13/iostream:41, from produsmaxim.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 produsmaxim.cpp:30:23: /usr/include/c++/13/ostream:204:25: warning: ‘a’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ produsmaxim.cpp: In function ‘int main()’: produsmaxim.cpp:8:23: note: ‘a’ was declared here 8 | long long int x,k,a,b,c; | ^ 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 produsmaxim.cpp:30:31: /usr/include/c++/13/ostream:204:25: warning: ‘b’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ produsmaxim.cpp: In function ‘int main()’: produsmaxim.cpp:8:25: note: ‘b’ was declared here 8 | long long int x,k,a,b,c; | ^ 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 produsmaxim.cpp:30:39: /usr/include/c++/13/ostream:204:25: warning: ‘c’ may be used uninitialized [-Wmaybe-uninitialized] 204 | { return _M_insert(__n); } | ~~~~~~~~~^~~~~ produsmaxim.cpp: In function ‘int main()’: produsmaxim.cpp:8:27: note: ‘c’ was declared here 8 | long long int x,k,a,b,c; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Caught fatal signal 11 | 10 | 0 | Exemplu | |
| 2 | 0 secunde | Caught fatal signal 11 | 20 | 0 | ||
| 3 | 0 secunde | Caught fatal signal 11 | 20 | 0 | ||
| 4 | 0.001 secunde | Caught fatal signal 11 | 20 | 0 | ||
| 5 | 0.001 secunde | Caught fatal signal 11 | 30 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ProdusMaxim 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ă.