A Reverse

AtCoder
IDabc233_b
Time2000ms
Memory256MB
Difficulty
You are given integers $L$, $R$, and a string $S$ consisting of lowercase English letters. Print this string after reversing (the order of) the $L$\-th through $R$\-th characters. ## Constraints * $S$ consists of lowercase English letters. * $1 \le |S| \le 10^5$ ($|S|$ is the length of $S$.) * $L$ and $R$ are integers. * $1 \le L \le R \le |S|$ ## Input Input is given from Standard Input in the following format: $L$ $R$ $S$ [samples]
Samples
Input #1
3 7
abcdefgh
Output #1
abgfedch

After reversing the $3$\-rd through $7$\-th characters of `abcdefgh`, we have `abgfedch`.
Input #2
1 7
reviver
Output #2
reviver

The operation may result in the same string as the original.
Input #3
4 13
merrychristmas
Output #3
meramtsirhcyrs
API Response (JSON)
{
  "problem": {
    "name": "A Reverse",
    "description": {
      "content": "You are given integers $L$, $R$, and a string $S$ consisting of lowercase English letters.   Print this string after reversing (the order of) the $L$\\-th through $R$\\-th characters.",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc233_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given integers $L$, $R$, and a string $S$ consisting of lowercase English letters.  \nPrint this string after reversing (the order of) the $L$\\-th through $R$\\-th characters.\n\n## Constraints\n\n*...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments