57. Hashtags

Time Limit: 2 seconds

Memory Limit: 1024 MB

Rating: 1400

Problem Statement

You are given a non-negative integer $N$. See the following sample cases to figure out the recursive pattern. The value of $N$ does not exceed $5$.

Input

The first line has integer $N$ $(0 \le N \le 4)$

Output

See the sample cases for what you should output.

Sample Cases
Sample Input 1:
0

Sample Output 1:
#


Sample Input 2:
1

Sample Output 2:
 # # 
#####
 # # 
#####
 # # 


Sample Input 3:
2

Sample Output 3:
      # #       # #      
     #####     #####     
      # #       # #      
     #####     #####     
      # #       # #      
 # #  # #  # #  # #  # # 
#########################
 # #  # #  # #  # #  # # 
#########################
 # #  # #  # #  # #  # # 
      # #       # #      
     #####     #####     
      # #       # #      
     #####     #####     
      # #       # #      
 # #  # #  # #  # #  # # 
#########################
 # #  # #  # #  # #  # # 
#########################
 # #  # #  # #  # #  # # 
      # #       # #      
     #####     #####     
      # #       # #      
     #####     #####     
      # #       # #      
Explanation

Not available for this problem.

Sources

IanOJ Contest #1 (Div. 3) > Problem C

Submit | Back