Problem2912--【语言基础】字符串基本练习-提取子串1

2912: 【语言基础】字符串基本练习-提取子串1

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

给定一个整数n(2<= n <= 1000)和定一个整数k(1<= k <=n),以及由n个小写英文字符组成的字符串s,请按顺序打印出s中所有长度为k的子串。
例如:
输入:
5 2
hello
输出:
he
el
ll
lo

Sample Input Copy

9 9
beautiful

Sample Output Copy

beautiful

Source/Category