1753 - I2P(I)2019_Hu_hw2 Scoreboard

Time

2019/09/23 21:00:00 2019/10/11 23:59:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12383 Star Pyramid
12385 Exponents Table
12386 Safe Password

12383 - Star Pyramid   

Description

Print a star pyramid composed of symbol *.

The first layer is *.

The second layer is **.

.

The N layer is supposed to have n star.

The N+1 layer is supposed to have n-1 star.

.

The 2N-1 layer is *.

Input

Input N to decide how many layers to print.

Output

Star pyramid.

Detail will show in sample output.

Remember put "\n" at the end of each line.

Sample Input  Download

Sample Output  Download

Tags




Discuss




12385 - Exponents Table   

Description

Try to create a 9*9 2-dimension array.

Data in this matrix[i][j] will be (i+1)^(l+1) which i is the base and j is the power of exponent.

You will need use while loop to calculate the exponents.

Remeber change your line in the end of the row.

 

Input

No need in this question.

Output

9*9 table. 

Every data number follow a blank.

Sample Input  Download

Sample Output  Download

Tags




Discuss




12386 - Safe Password   

Description

"dontouchM" is a message about your personal safety.

You want to encode this password to protect it, and you got an idea.

First, you save this password into an array, and shift it left N(if N is negative)or right N(if N is positive) according to your input N.

Next, save it in column-major order into a 3*3 array.

Finally, output it in row-major order.

For example, you input 1, then you get Mdontouch.

Next, put it into 3*3 2D array in column-major.

M n u
d t c
o o

h

Now, print it in row-major which is Mnudtcooh

 

GL HF!

Input

N, shift value, decide shift direction and distance.

Notice:|N| <9

Output

Your encodeed password. Remember change your line in the end.

Sample Input  Download

Sample Output  Download

Tags




Discuss