#945
Se dă un număr n scris în baza b și trebuie afișat în baza c.
| Problema | baze | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64558142 | Utilizator | |
| Fișier | baze.cpp | Dimensiune | 725 B |
| Data încărcării | 14 Mai 2026, 10:54 | Scor/rezultat | Eroare de compilare |
baze.cpp:5:1: error: ‘ll’ does not name a type 5 | ll toBase10(ll nr, ll fromBase) | ^~ baze.cpp:19:6: error: variable or field ‘fromBase10’ declared void 19 | void fromBase10(ll nr, ll toBase) | ^~~~~~~~~~ baze.cpp:19:17: error: ‘ll’ was not declared in this scope 19 | void fromBase10(ll nr, ll toBase) | ^~ baze.cpp:19:24: error: ‘ll’ was not declared in this scope 19 | void fromBase10(ll nr, ll toBase) | ^~ baze.cpp: In function ‘int main()’: baze.cpp:39:4: error: ‘ll’ was not declared in this scope 39 | ll nb, n10; | ^~ baze.cpp:40:6: error: expected ‘;’ before ‘b’ 40 | ll b, c; | ^~ | ; baze.cpp:41:16: error: ‘nb’ was not declared in this scope 41 | std::cin >> nb >> b >> c; | ^~ baze.cpp:41:22: error: ‘b’ was not declared in this scope 41 | std::cin >> nb >> b >> c; | ^ baze.cpp:41:27: error: ‘c’ was not declared in this scope 41 | std::cin >> nb >> b >> c; | ^ baze.cpp:43:4: error: ‘n10’ was not declared in this scope 43 | n10 = toBase10(nb, b); // l-am transformat pe n in baza 10 | ^~~ baze.cpp:43:10: error: ‘toBase10’ was not declared in this scope 43 | n10 = toBase10(nb, b); // l-am transformat pe n in baza 10 | ^~~~~~~~ baze.cpp:44:4: error: ‘fromBase10’ was not declared in this scope 44 | fromBase10(n10, c); | ^~~~~~~~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema baze 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ă.