#1298
Aflaţi suma cifrelor numărului care reprezintă numărul de numere de n cifre care se pot forma cu cifrele 3 şi 4.
| Problema | Suma34 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 1.4 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64475946 | Utilizator | |
| Fișier | suma34.cpp | Dimensiune | 1.84 KB |
| Data încărcării | 09 Mai 2026, 14:05 | Scor/rezultat | 80 puncte |
suma34.cpp: In function ‘bignum subtract(bignum&, bignum&)’: suma34.cpp:50:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 50 | for (int i = 0; i < x.size(); ++i) { | ~~^~~~~~~~~~ suma34.cpp:52:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 52 | if (i < y.size()) cif = y[i]; | ~~^~~~~~~~~~ suma34.cpp: In function ‘bignum multiply(bignum&, bignum&)’: suma34.cpp:85:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 85 | for (int i = 0; i < x.size(); ++i) { | ~~^~~~~~~~~~ suma34.cpp:87:35: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 87 | for (int j = 0; j < y.size() or carry; ++j) { | ~~^~~~~~~~~~ suma34.cpp:89:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 89 | if (j < y.size()) cif = y[j]; | ~~^~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | OK. | 10 | 10 | ||
| 3 | 0.002 secunde | OK. | 10 | 10 | ||
| 4 | 0.003 secunde | OK. | 10 | 10 | ||
| 5 | 0.002 secunde | OK. | 10 | 10 | ||
| 6 | 0.009 secunde | OK. | 10 | 10 | ||
| 7 | 0.043 secunde | OK. | 10 | 10 | ||
| 8 | 0.429 secunde | OK. | 10 | 10 | ||
| 9 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 10 | Depășit | Limita de timp depășită | 10 | 0 | ||
| Punctaj total | 80 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Suma34 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ă.