#include<stdio.h> #include<string.h> #include<math.h> #include<malloc.h> int main(){ int n; scanf("%d", &n); int x = 1; for (int i = 1;i < n;i++) { x = (x + 1) * 2; } printf("%d", x); }
Double click to view unformatted code.