#946
Se dă un număr scris în baza 2. Să se afișeze valoarea acestuia în baza 4.
| Problema | douabaze | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64735401 | Utilizator | |
| Fișier | douabaze.cpp | Dimensiune | 883 B |
| Data încărcării | 26 Mai 2026, 19:47 | Scor/rezultat | 100 puncte |
douabaze.cpp: In function ‘int main()’: douabaze.cpp:7:9: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations] 7 | gets(s); | ~~~~^~~ In file included from /usr/include/stdio.h:980, from douabaze.cpp:1: /usr/include/x86_64-linux-gnu/bits/stdio2.h:186:1: note: declared here 186 | gets (char *__str) | ^~~~ douabaze.cpp:8:14: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 8 | for(i=0;i<strlen(s);i++) | ~^~~~~~~~~~ douabaze.cpp:7:9: warning: ignoring return value of ‘char* gets(char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | gets(s); | ~~~~^~~ /usr/bin/ld: /tmp/cc35Bzxh.o: in function \`main': douabaze.cpp:(.text.startup+0x37): warning: the \`gets' function is dangerous and should not be used.
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | ||
| 2 | 0 secunde | OK. | 10 | 10 | ||
| 3 | 0 secunde | OK. | 10 | 10 | ||
| 4 | 0 secunde | OK. | 10 | 10 | ||
| 5 | 0 secunde | OK. | 10 | 10 | ||
| 6 | 0 secunde | OK. | 10 | 10 | ||
| 7 | 0 secunde | OK. | 10 | 10 | ||
| 8 | 0 secunde | OK. | 10 | 10 | ||
| 9 | 0.001 secunde | OK. | 10 | 10 | ||
| 10 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema douabaze 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ă.