#3957
Dându-se un număr natural n să se afle câte numere se pot obține folosind biții acestuia.
| Problema | counterase | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.01 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
| Id soluție | #64263118 | Utilizator | |
| Fișier | counterase.cpp | Dimensiune | 1.63 KB |
| Data încărcării | 27 Aprilie 2026, 09:01 | Scor/rezultat | 100 puncte |
counterase.cpp: In function ‘bool esteZero(std::string)’: counterase.cpp:8:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 8 | for (int i = 0; i < s.size(); i++) | ~~^~~~~~~~~~ counterase.cpp: In function ‘int imparteLa2(std::string&)’: counterase.cpp:21:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 21 | for (int i = 0; i < s.size(); i++) | ~~^~~~~~~~~~ counterase.cpp:32:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 32 | while (poz < rezultat.size() - 1 && rezultat[poz] == '0') | ~~~~^~~~~~~~~~~~~~~~~~~~~
| 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.002 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema counterase 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ă.