MAIN Home Schedule Rules Compile RESULTS Results PROBLEMS Novice Veteran All |
You are required to rotate a word a certain amount. For example, to rotate the word Computer by 1 results in rCompute. Rotating it two more times gives you terCompu.
InputYour input will be pairs of lines. The first line contains the word (which will not have more than 30 letters). The second line contains an integer n, which will be less than the length of the word. You must rotate the word n times. You will stop when you read a single # instead of a word on the first line.
OutputThe output will be the rotated word.
Sample Input
Computer 3 Program 1 #
Sample Output
terCompu mProgra
|
This page last updated 2001/04/05 20:28:54.