Untitled

mail@pastecode.io avatar
unknown
c_cpp
a month ago
355 B
0
Indexable
Never
#include <iostream>
using namespace std;

int main() {
    int n, k;
    cin >> n >> k;
    
    int najmalku = 1;
    for(int i = 0; i < k; i++) {
        najmalku *= 2;
    }
    najmalku += n - 1;
    
    int najmnogu = n;
    for(int i = 0; i < k; i++) {
        najmnogu *= 2;
    }
    cout << najmalku << " " << najmnogu << endl;
    return 0;
}

Leave a Comment