1427. Perform String Shifts Обновлено: 2024-03-12 1 мин Algorithms , LeetCode СодержаниеLeetCode problem 1427class Solution: def stringShift(self, s: str, shift: List[List[int]]) -> str: x = sum((b if a else -b) for a, b in shift) x %= len(s) return s[-x:] + s[:-x]