#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 | #64798825 | Utilizator | |
| Fișier | produsxxl.cpp | Dimensiune | 2.47 KB |
| Data încărcării | 02 Iunie 2026, 09:34 | Scor/rezultat | 100 puncte |
produsxxl.cpp: In function ‘HugeInt& operator+=(HugeInt&, const HugeInt&)’: produsxxl.cpp:24:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 24 | for (i = 0; i < lhs.cifre.size(); ++i) { | ~~^~~~~~~~~~~~~~~~~~ produsxxl.cpp:26:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 26 | if (i < rhs.cifre.size()) remorca += rhs.cifre[i]; | ~~^~~~~~~~~~~~~~~~~~ produsxxl.cpp:30:14: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 30 | while (i < rhs.cifre.size()) { | ~~^~~~~~~~~~~~~~~~~~ produsxxl.cpp: In function ‘HugeInt operator*(const HugeInt&, const HugeInt&)’: produsxxl.cpp:51:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 51 | for (int i = 0; i < lhs.cifre.size(); ++i) { | ~~^~~~~~~~~~~~~~~~~~ produsxxl.cpp:52:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 52 | for (int j = 0; j < rhs.cifre.size(); ++j) { | ~~^~~~~~~~~~~~~~~~~~ produsxxl.cpp:56:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 56 | for (int i = 0; i < rez.cifre.size(); ++i) { | ~~^~~~~~~~~~~~~~~~~~ produsxxl.cpp: In function ‘int main()’: produsxxl.cpp:76:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 76 | freopen("produsxxl.in", "r", stdin); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ produsxxl.cpp:77:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 77 | freopen("produsxxl.out", "w", stdout); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 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 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ă.