Insert

AtCoder
IDabc361_a
Time2000ms
Memory256MB
Difficulty
You are given an integer sequence $A$ of length $N$ and integers $K$ and $X$. Print the integer sequence $B$ obtained by inserting the integer $X$ immediately after the $K$\-th element of the sequence $A$. ## Constraints * All input values are integers. * $1 \le K \le N \le 100$ * $1 \le A_i, X \le 100$ ## Input The input is given from Standard Input in the following format: $N$ $K$ $X$ $A_1$ $A_2$ $\dots$ $A_N$ [samples]
Samples
Input #1
4 3 7
2 3 5 11
Output #1
2 3 5 7 11

For $K=3$, $X=7$, and $A=(2,3,5,11)$, we get $B=(2,3,5,7,11)$.
Input #2
1 1 100
100
Output #2
100 100
Input #3
8 8 3
9 9 8 2 4 4 3 5
Output #3
9 9 8 2 4 4 3 5 3
API Response (JSON)
{
  "problem": {
    "name": "Insert",
    "description": {
      "content": "You are given an integer sequence $A$ of length $N$ and integers $K$ and $X$.   Print the integer sequence $B$ obtained by inserting the integer $X$ immediately after the $K$\\-th element of the sequen",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc361_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given an integer sequence $A$ of length $N$ and integers $K$ and $X$.  \nPrint the integer sequence $B$ obtained by inserting the integer $X$ immediately after the $K$\\-th element of the sequen...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments