MAIN Home Schedule Rules Compile PROBLEMS Novice Veteran All |
Return to the Top of Page, 2000 Index Page, Novice Problem Set, or Veteran Problem Set.
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
Return to the Top of Page, 2000 Index Page, Novice Problem Set, or Veteran Problem Set. Test Data 0
Computer 3 Program 1 Prog 4 #
Return to the Top of Page, 2000 Index Page, Novice Problem Set, or Veteran Problem Set. Output for Test Data 0
terCompu mProgra Prog
Return to the Top of Page, 2000 Index Page, Novice Problem Set, or Veteran Problem Set. Test Data 1
Can 3 Hello 2 Multiplicity 3 Supermath 4 Abundantperfectanddeficient 6 #
Return to the Top of Page, 2000 Index Page, Novice Problem Set, or Veteran Problem Set. Output for Test Data 1
Can loHel ityMultiplic mathSuper icientAbundantperfectanddef
Return to the Top of Page, 2000 Index Page, Novice Problem Set, or Veteran Problem Set. Test Data 2
orca.st.usm.edu.bisland 3 woofergelimansweetie 7 m&mbrandplain 12 atleastihadabathtoday 5 #
Return to the Top of Page, 2000 Index Page, Novice Problem Set, or Veteran Problem Set. Output for Test Data 2
andorca.st.usm.edu.bisl sweetiewoofergeliman &mbrandplainm todayatleastihadabath
Return to the Top of Page, 2000 Index Page, Novice Problem Set, or Veteran Problem Set.
|
This page last updated Fri Feb 11 21:55:29 2000.