#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 | #64476017 | Utilizator | |
| Fișier | suma34.cpp | Dimensiune | 2.19 KB |
| Data încărcării | 09 Mai 2026, 14:12 | Scor/rezultat | 90 puncte |
suma34.cpp: In function ‘bignum subtract(bignum&, bignum&)’: suma34.cpp:49:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 49 | for (int i = 0; i < x.size(); ++i) { | ~~^~~~~~~~~~ suma34.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 | if (i < y.size()) cif = y[i]; | ~~^~~~~~~~~~ suma34.cpp: In function ‘bignum multiply(bignum&, bignum&)’: suma34.cpp:84:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 84 | for (int i = 0; i < x.size(); ++i) { | ~~^~~~~~~~~~ suma34.cpp:86:35: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 86 | for (int j = 0; j < y.size() or carry; ++j) { | ~~^~~~~~~~~~ suma34.cpp:88:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 88 | if (j < y.size()) cif = y[j]; | ~~^~~~~~~~~~ suma34.cpp: In function ‘bignum multiply_small(bignum&, int)’: suma34.cpp:101:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 101 | for (int i = 0; i < x.size() or carry; ++i) { | ~~^~~~~~~~~~ suma34.cpp:103:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 103 | if (i < x.size()) cif = x[i]; | ~~^~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.002 secunde | OK. | 10 | 10 | ||
| 3 | 0.001 secunde | OK. | 10 | 10 | ||
| 4 | 0.001 secunde | OK. | 10 | 10 | ||
| 5 | 0.001 secunde | OK. | 10 | 10 | ||
| 6 | 0.004 secunde | OK. | 10 | 10 | ||
| 7 | 0.014 secunde | OK. | 10 | 10 | ||
| 8 | 0.131 secunde | OK. | 10 | 10 | ||
| 9 | 1.248 secunde | OK. | 10 | 10 | ||
| 10 | Depășit | Limita de timp depășită | 10 | 0 | ||
| Punctaj total | 90 | |||||
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ă.