12403 - Safe Password_lab   

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 ROW-major order into a 3*3 array.

Finally, output it in COLUMN-major order.

note that : if use visual studio add #pragma warning(disable:4996) in first line to use scanf function

 

CAUTION!!

Not same as homework 

CAUTION!! 

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