joj2471

来源:互联网 发布:如何自学大数据 编辑:程序博客网 时间:2024/06/04 20:01

2471: String triangle


ResultTIME LimitMEMORY LimitRun TimesAC TimesJUDGE3s65536K3037604Standard

You are asked to draw a right-angle triangle, the given materials is a special word. Just see the sample for detail.

Input

The first line of each test case is a positive integer n. n is zero means the end of input that you should not care. The next line is a word (no blank) whose length is no more than 80.

Output

Print a right-angle triangle whose height and width are n using given word. You should print each character in the word in turn, if the last character is used, the next is the first character. Print a blank line between each case.

Sample Input

6WORLD3ABCD0

Sample Output

WORLDWORLDWORLDWORLDWABCDAB

Problem Source: skywind


This problem is used for contest: 101  157  168  179 


Submit / Problem List / Status / Discuss


原创粉丝点击