Perform String Shifts

给一个string和一组数组shift, 0 表示左移, 1表示右移, 后边的数字表示移动的位数, 问结果如何. 先计算结果的移动方法, 然后再构建.