Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- /**
- baze de numeratie
- 1. transformare din b10 in bq (2<=q<=9)
- 2. transformre din bq in b10
- a. numarul se cisteste intreg
- b. cifra cu cifra = 428
- */
- long long n, q, n10, c, i;
- int main()
- {
- ///2b.
- cin>>q>>n;///n numarul de cifre
- n10=0;
- for(i=1;i<=n;i++)
- {
- cin>>c;
- n10=n10*q+c;
- }
- cout<<n10;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement