#2409
Numim număr mare un număr care conține prea multe cifre pentru a fi memorat în tipurile existente, și număr mic un număr care poate fi memorat în acestea.
Se dau două numere, unul mare și unul mic, ambele pozitive. Calculați produsul lor.
| Problema | ProdusXL | Operații I/O |
produsxl.in/produsxl.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64691299 | Utilizator | |
| Fișier | produsxl.cpp | Dimensiune | 8.75 KB |
| Data încărcării | 23 Mai 2026, 15:26 | Scor/rezultat | 100 puncte |
produsxl.cpp: In member function ‘NrMare& NrMare::operator+=(const NrMare&)’: produsxl.cpp:99:14: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 99 | if (i<cif.size()) s+=cif[i]; | ~^~~~~~~~~~~ produsxl.cpp:100:14: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 100 | if (i<x.cif.size()) s+=x.cif[i]; | ~^~~~~~~~~~~~~ produsxl.cpp:103:14: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 103 | if (i>=cif.size()) cif.push_back(s%10); | ~^~~~~~~~~~~~ produsxl.cpp: In member function ‘NrMare& NrMare::operator-=(const NrMare&)’: produsxl.cpp:123:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 123 | for (i=0; i<cif.size(); i++) | ~^~~~~~~~~~~ produsxl.cpp:126:14: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 126 | if (i<x.cif.size()) d-=x.cif[i]; // scadem cifra din numarul x, daca exista | ~^~~~~~~~~~~~~ produsxl.cpp: In member function ‘NrMare& NrMare::operator*=(const NrMare&)’: produsxl.cpp:146:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 146 | for (i=0; i<cif.size(); i++) | ~^~~~~~~~~~~ produsxl.cpp:150:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 150 | for (j=0; j<x.cif.size() || t; j++) | ~^~~~~~~~~~~~~ produsxl.cpp:154:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 154 | if (j<x.cif.size()) curent+=1LL*cif[i]*x.cif[j]; | ~^~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 20 | 20 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ProdusXL 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ă.