#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 | #53860419 | Utilizator | |
Fișier | baze1.cpp | Dimensiune | 480 B |
Data încărcării | 13 Noiembrie 2024, 13:08 | Scor / rezultat | Eroare de compilare |
baze1.cpp: In function 'int main()': baze1.cpp:7:5: error: expected ',' or ';' before 'ofstream' ofstream cout("baze1.out") ^ baze1.cpp:10:10: error: 'b1' was not declared in this scope cin>>b1<<b2; ^ baze1.cpp:10:14: error: 'b2' was not declared in this scope cin>>b1<<b2; ^ baze1.cpp:12:10: error: 'x' was not declared in this scope cin>>x>>y; ^ baze1.cpp:12:13: error: 'y' was not declared in this scope cin>>x>>y; ^ baze1.cpp:14:6: error: 'u' was not declared in this scope {u=x%10; ^ baze1.cpp:15:6: error: 'n' was not declared in this scope n=u*p; ^ baze1.cpp:15:10: error: 'p' was not declared in this scope n=u*p; ^ baze1.cpp:20:6: error: 'u' was not declared in this scope {u=y%10; ^ baze1.cpp:21:6: error: 'm' was not declared in this scope m=u*p; ^ baze1.cpp:21:10: error: 'p' was not declared in this scope m=u*p; ^ baze1.cpp:25:11: error: 'S' was not declared in this scope cout<<S=m+n; ^ baze1.cpp:25:13: error: 'm' was not declared in this scope cout<<S=m+n; ^ baze1.cpp:25:15: error: 'n' was not declared in this scope cout<<S=m+n; ^ baze1.cpp:27:1: error: expected ';' before '}' token } ^
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ă.