Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n,k;
- cin>>n>>k;
- int najmal=1,najgolem=n;
- for(int i=k;i>=1;i--){
- najmal*=2;
- }
- najmal+=n-1;
- for(int i=k;i>=1;i--){
- najgolem*=2;
- }
- cout<<najmal<<endl;
- cout<<najgolem<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement