fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a=2,n,m=1,q=0,r,w;
  5. scanf("%d",&n);
  6. while(q!=n-1){
  7. m=m*3;
  8. q=q+1;
  9. }
  10. w=2*m;
  11. printf("%d",w);
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0.01s 5320KB
stdin
1
stdout
2