The value under given constraints fits into a 32-bit signed integer typeint. It is known that the power of two can be calculated by left shift: 2^n = 1 << n. Using the left shift, we calculatethe sum 2^k + 2^n as (1 << k) + (1 << n).
Read the input data. Calculate and output the answer.
scanf("%d %d",&k,&n);
res = (1 << k) + (1 << n);
printf("%d\n", res);Python implementation
k,n = map(int,input().split())
res = (1 << k) + (1 << n)
print(res)