Little_hobbit

680 Садовник-художник - Динамика

Jul 8th, 2020
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main( )
  4. {
  5.     FILE *in = fopen("input.txt", "rt");
  6.     FILE *out = fopen("output.txt", "wt");
  7.  
  8.     if (in && out)
  9.     {
  10.         int n;
  11.         unsigned long long count = 1;
  12.         fscanf(in, "%d", &n);
  13.  
  14.         for (int i = 0; i < n - 1; ++i)
  15.         {
  16.             count *= 2;
  17.         }
  18.         count *= 3;
  19.  
  20.         fprintf(out, "%llu\n", count);
  21.     }
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment