#1003
Baze1
Se dau două numere b1 b2
, reprezentând două baze de numeraţie şi două şiruri de cifre x y
, reprezentând două numere: x
în baza b1
, y
în baza b2
. Determinaţi suma numerelor x
şi y
în baza 10
.
Problema | Baze1 | Operații I/O |
baze1.in /baze1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53860509 | Utilizator | |
Fișier | baze1.cpp | Dimensiune | 465 B |
Data încărcării | 13 Noiembrie 2024, 13:12 | Scor / rezultat | Eroare de compilare |
baze1.cpp: In function 'int main()': baze1.cpp:7:1: error: expected ',' or ';' before 'ofstream' ofstream fout ("baze1.out") ^ baze1.cpp:9:9: error: 'b1' was not declared in this scope fin >> b1 >> b2 >> x >> y; ^ baze1.cpp:9:15: error: 'b2' was not declared in this scope fin >> b1 >> b2 >> x >> y; ^ baze1.cpp:9:21: error: 'x' was not declared in this scope fin >> b1 >> b2 >> x >> y; ^ baze1.cpp:9:26: error: 'y' was not declared in this scope fin >> b1 >> b2 >> x >> y; ^ baze1.cpp:11:13: error: 'r1' was not declared in this scope while (x){ r1 = x % b1; ^ baze1.cpp:12:13: error: 'mx' was not declared in this scope mx = r * p + mx; ^ baze1.cpp:12:18: error: 'r' was not declared in this scope mx = r * p + mx; ^ baze1.cpp:12:22: error: 'p' was not declared in this scope mx = r * p + mx; ^ baze1.cpp:15:1: error: 'p' was not declared in this scope p=1; ^ baze1.cpp:16:12: error: 'r2' was not declared in this scope while (y){ r2 = y % b2; ^ baze1.cpp:17:13: error: 'my' was not declared in this scope my = r * p + m; ^ baze1.cpp:17:18: error: 'r' was not declared in this scope my = r * p + m; ^ baze1.cpp:17:26: error: 'm' was not declared in this scope my = r * p + m; ^ baze1.cpp:21:9: error: 'm1' was not declared in this scope cout << m1+m2; ^ baze1.cpp:21:12: error: 'm2' was not declared in this scope cout << m1+m2; ^ baze1.cpp:21:14: error: expected '}' at end of input cout << m1+m2; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Baze1 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ă.