#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 | #64709151 | Utilizator | |
| Fișier | baze.cpp | Dimensiune | 485 B |
| Data încărcării | 25 Mai 2026, 12:56 | Scor/rezultat | Eroare de compilare |
baze.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include <bits/stdc++.h> | ^ baze.cpp: In function ‘int main()’: baze.cpp:4:24: error: ‘cin’ was not declared in this scope 4 | long long int n, b, c; cin >> n >> b >> c; | ^~~ baze.cpp:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? +++ |+#include <iostream> 1 | #include <bits/stdc++.h> baze.cpp:4:29: error: ‘gt’ was not declared in this scope 4 | long long int n, b, c; cin >> n >> b >> c; | ^~ baze.cpp:4:59: warning: statement has no effect [-Wunused-value] 4 | long long int n, b, c; cin >> n >> b >> c; | ^ baze.cpp:12:30: error: expected primary-expression before ‘=’ token 12 | for (int i = temp - 2; i >= 0; i--) { | ^ baze.cpp:12:33: error: expected ‘)’ before ‘;’ token 12 | for (int i = temp - 2; i >= 0; i--) { | ~ ^ | ) baze.cpp:12:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 12 | for (int i = temp - 2; i >= 0; i--) { | ^~~ baze.cpp:12:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | for (int i = temp - 2; i >= 0; i--) { | ^ baze.cpp:12:35: error: ‘i’ was not declared in this scope baze.cpp:20:32: error: expected primary-expression before ‘=’ token 20 | } for (int i = temp - 1; i >= 0; i--) cout << v2[i]; | ^ baze.cpp:20:35: error: expected ‘)’ before ‘;’ token 20 | } for (int i = temp - 1; i >= 0; i--) cout << v2[i]; | ~ ^ | ) baze.cpp:20:52: error: ‘lt’ was not declared in this scope 20 | } for (int i = temp - 1; i >= 0; i--) cout << v2[i]; | ^~
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ă.