Advertisement
Guest User

Holes 20.08.13

a guest
Aug 20th, 2013
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include <ctype.h>
  6. #include <bitset>
  7. #include <iostream>
  8. #include <stack>
  9. #include <queue>
  10. #include <set>
  11. #include <map>
  12. #include <string>
  13. #include <algorithm>
  14. using namespace std;
  15.  
  16.  
  17. int main() {
  18.     freopen("holes.in", "r", stdin);
  19.     freopen("holes.out", "w", stdout);
  20.     int n;
  21.     scanf("%d", &n);
  22.     if (n == 0) {
  23.         printf("1");
  24.     } else if (n == 1) {
  25.         printf("0");
  26.     } else {
  27.         if (n % 2 == 1) printf("4");
  28.         n = n / 2;
  29.         for(int i = 0; i < n; ++i) printf("8");
  30.     }
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement