#2410
Numim număr mare un număr care conține prea multe cifre pentru a fi memorat în tipurile existente.
Se dau două numere mari. Calculați produsul lor.
| Problema | ProdusXXL | Operații I/O |
produsxxl.in/produsxxl.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64592302 | Utilizator | |
| Fișier | produsxxl.cpp | Dimensiune | 5.16 KB |
| Data încărcării | 17 Mai 2026, 14:18 | Scor/rezultat | 0 puncte |
produsxxl.cpp: In member function ‘NumarMare NumarMare::operator+(const NumarMare&) const’: produsxxl.cpp:53:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 53 | while (i < cifre.size() || i < altul.cifre.size() || transport) { | ~~^~~~~~~~~~~~~~ produsxxl.cpp:53:38: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 53 | while (i < cifre.size() || i < altul.cifre.size() || transport) { | ~~^~~~~~~~~~~~~~~~~~~~ produsxxl.cpp:54:39: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 54 | int suma = transport + (i < cifre.size() ? cifre[i] : 0) + | ~~^~~~~~~~~~~~~~ produsxxl.cpp:55:39: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 55 | (i < altul.cifre.size() ? altul.cifre[i] : 0); | ~~^~~~~~~~~~~~~~~~~~~~ produsxxl.cpp: In member function ‘NumarMare NumarMare::operator-(const NumarMare&) const’: produsxxl.cpp:67:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 67 | for (int i = 0; i < altul.cifre.size() || imprumut; i++) { | ~~^~~~~~~~~~~~~~~~~~~~ produsxxl.cpp:68:43: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 68 | rez.cifre[i] -= imprumut + (i < altul.cifre.size() ? altul.cifre[i] : 0); | ~~^~~~~~~~~~~~~~~~~~~~ produsxxl.cpp: In member function ‘NumarMare NumarMare::operator*(int) const’: produsxxl.cpp:87:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 87 | for (int i = 0; i < cifre.size() || transport; i++) { | ~~^~~~~~~~~~~~~~ produsxxl.cpp:88:47: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 88 | long long produs = transport + (i < cifre.size() ? (long long)cifre[i] * n : 0); | ~~^~~~~~~~~~~~~~ produsxxl.cpp: In member function ‘NumarMare NumarMare::operator*(const NumarMare&) const’: produsxxl.cpp:116:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 116 | for (int i = 0; i < cifre.size(); i++) { | ~~^~~~~~~~~~~~~~ produsxxl.cpp:118:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 118 | for (int j = 0; j < altul.cifre.size() || transport; j++) { | ~~^~~~~~~~~~~~~~~~~~~~ produsxxl.cpp:119:75: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 119 | long long curent = rez.cifre[i + j] + cifre[i] * 1LL * (j < altul.cifre.size() ? altul.cifre[j] : 0) + transport; | ~~^~~~~~~~~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ProdusXXL 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ă.