Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- int main(){
- int t, n;
- scanf("%d",&t);
- for(int a0 = 0; a0 < t; a0++){
- scanf("%d",&n);
- if (n%2==0)
- printf("%d\n", (int) pow(2, ((n/2)+1)) - 1);
- else
- printf("%d\n", (int) (pow(2, ((n-1)/2)+1)-1) * 2);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement