#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 | #53860410 | Utilizator | |
Fișier | baze1.cpp | Dimensiune | 350 B |
Data încărcării | 13 Noiembrie 2024, 13:08 | Scor / rezultat | Eroare de compilare |
baze1.cpp: In function 'int main()': baze1.cpp:6:5: error: expected ',' or ';' before 'ofstream' ofstream fout("baze1.out") ^ baze1.cpp:8:7: error: 'b1' was not declared in this scope fin>>b1>>b2; ^ baze1.cpp:8:11: error: 'b2' was not declared in this scope fin>>b1>>b2; ^ baze1.cpp:9:7: error: 'x' was not declared in this scope fin>>x>>y; ^ baze1.cpp:9:10: error: 'y' was not declared in this scope fin>>x>>y; ^ baze1.cpp:11:4: error: 'u' was not declared in this scope { u=x%10; ^ baze1.cpp:12:3: error: 'm' was not declared in this scope m=m+u*p; ^ baze1.cpp:12:9: error: 'p' was not declared in this scope m=m+u*p; ^ baze1.cpp:16:4: error: 'z' was not declared in this scope { z=y%10; ^ baze1.cpp:17:3: error: 'n' was not declared in this scope n=n+z*p; ^ baze1.cpp:17:9: error: 'p' was not declared in this scope n=n+z*p; ^ baze1.cpp:20:4: error: 's' was not declared in this scope } s=m+n; ^ baze1.cpp:20:6: error: 'm' was not declared in this scope } s=m+n; ^ baze1.cpp:20:8: error: 'n' was not declared in this scope } s=m+n; ^ baze1.cpp:21:9: error: expected '}' at end of input cout<<s; ^
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ă.