#1270
b16
Se dă un număr natural în baza 16
. Să se transforme acest număr în baza 10
.
Problema | b16 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50310594 | Utilizator | |
Fișier | b16.cpp | Dimensiune | 498 B |
Data încărcării | 04 Aprilie 2024, 09:38 | Scor / rezultat | 60 puncte |
b16.cpp: In function 'int main()': b16.cpp:13:14: warning: array subscript has type 'char' [-Wchar-subscripts] while(s[i]!='\0') ^ b16.cpp:15:15: warning: array subscript has type 'char' [-Wchar-subscripts] if(s[i]>='0' && s[i]<='9') ^ b16.cpp:15:28: warning: array subscript has type 'char' [-Wchar-subscripts] if(s[i]>='0' && s[i]<='9') ^ b16.cpp:17:24: warning: array subscript has type 'char' [-Wchar-subscripts] val=int(s[i]-'0'); ^ b16.cpp:19:15: warning: array subscript has type 'char' [-Wchar-subscripts] if(s[i]>='A' && s[i]<='F') ^ b16.cpp:19:28: warning: array subscript has type 'char' [-Wchar-subscripts] if(s[i]>='A' && s[i]<='F') ^ b16.cpp:21:27: warning: array subscript has type 'char' [-Wchar-subscripts] val=10+int(s[i]-'0'); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
3 | 0 secunde | OK. | 20 | 20 | ||
4 | 0 secunde | OK. | 20 | 20 | ||
5 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
Punctaj total | 60 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema b16 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ă.