Acrostic

AtCoder
IDsoundhound2018_summer_qual_b
Time2000ms
Memory256MB
Difficulty
You are given a string $S$ consisting of lowercase English letters. We will write down this string, starting a new line after every $w$ letters. Print the string obtained by concatenating the letters at the beginnings of these lines from top to bottom. ## Constraints * $1 \leq w \leq |S| \leq 1000$ * $S$ consists of lowercase English letters. * $w$ is an integer. ## Input Input is given from Standard Input in the following format: $S$ $w$ [samples]
Samples
Input #1
abcdefgh
3
Output #1
adg

When we write down `abcdefgh`, starting a new line after every three letters, we get the following:
abc  
def  
gh
Concatenating the letters at the beginnings of these lines, we obtain `adg`.
Input #2
lllll
1
Output #2
lllll
Input #3
souuundhound
2
Output #3
suudon
API Response (JSON)
{
  "problem": {
    "name": "Acrostic",
    "description": {
      "content": "You are given a string $S$ consisting of lowercase English letters. We will write down this string, starting a new line after every $w$ letters. Print the string obtained by concatenating the letters ",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "soundhound2018_summer_qual_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given a string $S$ consisting of lowercase English letters. We will write down this string, starting a new line after every $w$ letters. Print the string obtained by concatenating the letters ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments