2428 - I2P(I)2021_Hu_lab5-A Scoreboard

Time

2021/11/22 20:30:00 2021/11/22 20:31:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12934 Rotate Numbers
13339 Karpet Ribet

12934 - Rotate Numbers   

Description

Given a large integer, please rotate the whole number by 180and print out the result.

 

For example:

However, sometimes after you rotate the number, it becomes meaningless, for example:

Besides, after you rotate the number, if there are some zeros in the front, do not print them out, for example:

 

Input

The input contains an integer N,  which N is no more than 100 digits.

Output

Output the 180 degree rotated number, if the rotated number is meaningless, output "No". Please add a newline at the end of your answer.

Sample Input  Download

Sample Output  Download

Tags




Discuss




13339 - Karpet Ribet   

Description

Ribet means complicated in Indonesian.  This problem can be solved with recursion, similar to Sierpinski. 

     

RH, a green sock, loves programming and overcomplicating things.

After finishing Sierpinski's Carpet, he think that it was way too simple, So he designed a cooler looking carpet and named it Karpet Ribet.  

The square in the center should be of length 8 units.

 

The construction is decribed as follow.

For a Carpet that has depth 1, consists of 1x1 square colored black.

For depth 2, it has side length 4, its 4 corners are made up of depth 1 Carpet with a 2x2 center square.

For depth 3, it has side length 10, its 4 corners are made up of depth 2 Carpet with a 4x4 center square.

For carpet with depth of n, its 4 corners are made up of depth (n-1) carpet  with a 2n-1 center square.

For a clear picture, the following figures are the carpet with Depth 1, 2, and 3.

                                            

The following figure is the carpet with depth 5.

The square in the center should be of length 16 units.

Input

Input contains only one line with single integer n (1 <= n < 12).

Output

Output the carpet with depth n and use ' ' (space) to represent white, '*' to represent black.
Remember to add a newline character at the end of line.

Sample Input  Download

Sample Output  Download

Tags




Discuss