Problem:


Score : 200 points

Problem Statement

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

Output

Print the desired string in one line.

Sample Input 1

abcdefgh
3

Sample 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.

Sample Input 2

lllll
1

Sample Output 2

lllll

Sample Input 3

souuundhound
2

Sample Output 3

suudon



Sample input:
abcdefgh
3


Sample output:
adg

Submission status: Accepted

Solution code:
S = input()
w = int(input())

sl = []
ans = ''
tmp_s = ''
for i, s in enumerate(S):
    tmp_s += s
    if (i+1) % w == 0:
        ans += tmp_s[0]
        tmp_s = ''
else:
    if len(tmp_s) >= 1:
        ans += tmp_s[0]
print(ans)

Submission status: Accepted

Solution code:
s = input()
n = int(input())
ss = ""
for i in range(0, len(s), n):
    ss += s[i]
print(ss)

Submission status: Accepted

Solution code:
import random as rng
import itertools as it
import collections as col
import heapq as hq
import sys
import copy as cp
sys.setrecursionlimit(10**9)


def dump_impl(*objects):
    print(*objects, file=sys.stderr)


def dump_dummy(*objects):
    pass


dump = dump_impl if "DEBUG" in sys.argv else dump_dummy

S = input()
w = int(input())
ans = []
for i in range((len(S)+w-1)//w):
    ans.append(S[i*w])
print("".join(ans))

Submission status: Accepted

Solution code:
S = input()
w = int(input())
ans = ""

for i in range(0, len(S), w):
    ans += S[i]
print(ans)

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = "".join(s[::w])
print(ans)

Submission status: Accepted

Solution code:
s=input()
s = list(s)

n=int(input())
i = 0
res = []

while i < len(s):
    res.append(s[i])
    i += n

print(''.join(res))

Submission status: Accepted

Solution code:
S = input()
N = int(input())
result = []
for i in range(0,len(S),N):
  result.append(S[i])
print("".join(result))

Submission status: Accepted

Solution code:
S = input()
w = int(input())
s = ''
if w == 1:
  print(S)
else:
  if len(S) % w == 0:
    for i in range(len(S) // w):
      s += S[i * w]
    print(s)
  else:
    for i in range((len(S) // w) + 1):
      s += S[i * w]
    print(s)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
s = input()
w = int(input())
print(s[::w])

Submission status: Accepted

Solution code:
def main(s: str, w: int):
    print(s[::w])


if __name__ == "__main__":
    s = input()
    w = int(input())

    main(s, w)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

S = input()
w = int(input())

print(S[::w])

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = ""
for i in range(-(-len(s) // w)):
    ans = ans + s[i * w]

print(ans)

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = []
for i in range(len(s)):
    if i%w==0:
        ans.append(s[i])
ans = ''.join(ans)
print(ans)

Submission status: Accepted

Solution code:
s = input()
w = int(input())

for i in range(0, len(s), w):
    print(s[i], end="")

Submission status: Accepted

Solution code:
s=str(input())
w=int(input())

for i in range(len(s)):
    if i%w==0:
        print(s[i],end="")

Submission status: Accepted

Solution code:
s = input()
w = int(input())
for i in range(len(s)):
    if i % w == 0:
        print("{}".format(s[i]), end="")

Submission status: Accepted

Solution code:
s = input()
n = int(input())
ans = ''
m = 0
while m < len(s):
    ans += s[m]
    m += n
    
print(ans)

Submission status: Accepted

Solution code:
s,w=str(input()),int(input())
y="".join([s[i] for i in range(0,len(s),w)])
print(y)

Submission status: Accepted

Solution code:
S = input()
t = int(input())
a = ""
for i in range(len(S)):
  if i % t == 0:
    a += S[i]
    
print (a)

Submission status: Accepted

Solution code:
sl = list(input())
w = int(input())

print("".join(sl[::w]))

Submission status: Accepted

Solution code:
S = input()
W = int(input())
for i in range(0,len(S),W):
	print(S[i],end="")

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = ""
for i in range(0,len(s),w):
	ans += s[i]

print(ans)

Submission status: Accepted

Solution code:
s=input()
w=int(input())
import math
n = math.ceil(len(s) / w)
ans=""
for i in range(n):
  ans += s[i * w]
print(ans)

Submission status: Accepted

Solution code:

a = input()
b = int(input())

l =[]
k = 0
s = a[0]
for i in a:
    if k == b:
        s+=i
        k =0
    k+=1
print(s)

Submission status: Accepted

Solution code:
S,w=open(0);print(S[::int(w)])

Submission status: Accepted

Solution code:
S=input()
k=int(input())
ans=[]
for i in range(0,len(S),k):
  ans.append(S[i])
print("".join(ans))

Submission status: Accepted

Solution code:
def main():
    S = input()
    w = int(input())
    ans = ""
    for i in range(len(S)):
        if i%w==0:
            ans += S[i]
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from sys import stdin
s = stdin.readline().rstrip()
n = int(stdin.readline().rstrip())
print(s[::n])

Submission status: Accepted

Solution code:
from sys import stdin

s = stdin.readline().rstrip()
n = int(stdin.readline().rstrip())

s = s[::n]

print(s)

Submission status: Accepted

Solution code:
s = input()
w = int(input())

ans = ""

for i in range(len(s)):
    if i % w == 0:
        ans += s[i]

print(ans)

Submission status: Accepted

Solution code:
s=input()
n=int(input())
i=0
while n*i<len(s):
    print(s[n*i],end='')
    i+=1

Submission status: Accepted

Solution code:
S = input()
w = int(input())

N = len(S)

ans = ''
for i in range(0, N, w):
	ans += S[i]
print(ans)

Submission status: Accepted

Solution code:
s=input()
w=int(input())
ans=''
for i in range(len(s)):
    if i%w==0:
        ans+=s[i]
print(ans)

Submission status: Accepted

Solution code:
S = input()
w = int(input())
print(''.join([s for s in S[::w]]))

Submission status: Accepted

Solution code:
S=input()
w=int(input())

print(S[0::w])

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = []
for i in range(0,len(s),w):
    ans.append(s[i])
print(''.join(ans))

Submission status: Accepted

Solution code:
S = input()
w = int(input())
ans = ''
for i in range(0, len(S), w):
    ans += S[i: i + 1]

print(ans)

Submission status: Accepted

Solution code:
S = input()
w = int(input())
ans = ""
for i in range(0,len(S),w):
  ans += S[i]
print(ans)

Submission status: Accepted

Solution code:

strings=[input() for string in range(2)]
string=strings[0]
num=int(strings[1])
result=""
for i in range(len(string)):
    if i% num==0:
        result=result+string[i]
    i=i+1
print(result)

Submission status: Accepted

Solution code:
# 2019/12/15

s=input()
w=int(input())

print(s[::w])

Submission status: Accepted

Solution code:
s = list(input())
ans = ""
w = int(input())
for i in range(0,len(s),w):
    ans += s[i]
print(ans)

Submission status: Accepted

Solution code:
S = input().strip()
w = int(input())
x = S[::w]
print(x)

Submission status: Accepted

Solution code:
#coding:utf-8
s = input()
w = int(input())
print(s[0::w])

Submission status: Accepted

Solution code:
s=input()
n=int(input())
w=[]
i=0
while i < len(s):
  w.append(s[i])
  i += n
print(''.join(w))

Submission status: Accepted

Solution code:
def examB():
    S = SI()
    w = I()
    ans = ""
    i=0
    while(i<len(S)):
        ans +=S[i]
        i +=w

    print(ans)



import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s = str(readline().rstrip().decode('utf-8'))
    w = int(readline())
    ans = []
    for i in range(0, len(s), w):
        ans.append(s[i])
    print("".join(ans))


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
print(*input()[::int(input())],sep='')

Submission status: Accepted

Solution code:
print(input()[0::int(input())])

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
S = list(input())[: -1]
w = int(input())
print("".join(S[: : w]))

Submission status: Accepted

Solution code:
s=input()
w=int(input())
ans=''
for i in s[::w]:
	ans+=i
print(ans)

Submission status: Accepted

Solution code:
S = list(input())
k = int(input())

ans = ''
for i, s in enumerate(S):
  if i%k == 0:
    ans += s
print(ans)

Submission status: Accepted

Solution code:
S = list(input())
w = int(input())
print("".join(S[::w]))

Submission status: Accepted

Solution code:
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353

S = sys.stdin.readline().rstrip()
w = int(sys.stdin.readline())
print(S[::w])

Submission status: Accepted

Solution code:
S = input()
w = int(input())
print(S[0::w])

Submission status: Accepted

Solution code:
s=input()
x=int(input())
ans=""
for i in range(0,len(s),x):
  ans+=s[i]
print(ans)

Submission status: Accepted

Solution code:
s = list(input())
w = int(input())
ans =[]
 
for i in range(len(s)):
    if i%w == 0:
        ans.append(s[i])
        
print("".join(ans))

Submission status: Accepted

Solution code:
s=list(input())
w=int(input())
x=[]
y=''
ans=''
count=[]
for i in range(len(s)):
    y+=s[i]
    if len(list(y))==w:
        x.append(y)
        y=''
    if i==len(s)-1 and y!='':
        x.append(y)
for j in range(len(x)):
    count=list(x[j])
    ans+=count[0]
print(ans)

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

s = input()
n = inp()
L = ''
for i in range(len(s))[::n]:
    L += s[i]
print(L)

Submission status: Accepted

Solution code:
S = input()
w = int(input())
ans = S[::w]
print(ans)

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = ""
for i in range((len(s) // w) + 1):
    if i * w < len(s):
        ans += s[i * w]
print(ans)

Submission status: Accepted

Solution code:
S = input()
w = int(input())
ans = []

for i in range(0,len(S), w):
	ans.append(S[i])

print("".join(ans))

Submission status: Accepted

Solution code:
s=input()
w=int(input())
ans=[s[0]]
k=w
while k<len(s):
    ans.append(s[k])
    k+=w
print("".join(ans))

Submission status: Accepted

Solution code:
S=input()
W=int(input())
for i in range((len(S)+W-1)//W):
  print(S[i*W],end="")

Submission status: Accepted

Solution code:
s = input()
w = int(input())

ans = ''
for i in range(0, len(s), w):
    ans += s[i]
print(ans)

Submission status: Accepted

Solution code:
s=str(input())
w=int(input())
print(s[::w])

Submission status: Accepted

Solution code:
S=input()
w=int(input())

ans=''
for i in range(0,len(S),w):
  ans+=S[i]
print(ans)

Submission status: Accepted

Solution code:
S = list(input())
w = int(input())
for i in range(0, len(S), w):
  print (S[i], end ='')
print ()

Submission status: Accepted

Solution code:
S=input()
w=int(input())

ans=[]
cnt=0
while(w*cnt+1<=len(S)):
    ans.append(S[w*cnt])
    cnt+=1

print("".join(map(str,ans)))

Submission status: Accepted

Solution code:
def resolve():
    s = input()
    w = int(input())
    print(s[::w])


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    s = list(str(input().rstrip('\n')))
    w = int(input().rstrip('\n'))
    print("".join(s[::w]))


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
s=list(input())
n=int(input())
ans=[]
m=len(s)//n
if len(s)%n!=0:
    m+=1
for i in range(m):
    ans.append(s[n*i])
print(''.join(ans))

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = [s[i] if i % w == 0 else "" for i in range(len(s))]
print("".join(ans))

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    s = str(input().rstrip('\n'))
    w = int(input().rstrip('\n'))
    print(s[::w])


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
import math

S = input()
w = int(input())

a = ''
for s in range(math.ceil(len(S) / w)):
    a += S[s*w]

print(a)

Submission status: Accepted

Solution code:
s = list(input())
n = int(input())
a = ''
for i in range(0, len(s), n):
  a += s[i]
print(a)

Submission status: Accepted

Solution code:
s=list(input())
n=int(input())


ans=''
for i in range(len(s)):
    if i*n<=len(s)-1:
        ans+=s[i*n]
print(ans)

Submission status: Accepted

Solution code:
s=input()
w=int(input())
ans=s[0::w]
print(ans)

Submission status: Accepted

Solution code:
S,w=input(),int(input())
print(S[0::w])

Submission status: Accepted

Solution code:
s=input()
w=int(input())
ans=""

i=0
while(i<len(s)):
    ans+=s[i]
    i+=w
print(ans)

Submission status: Accepted

Solution code:
def main():

    S = input()
    w = int(input())
    ans = ""
    for i in range(len(S)):
        if i % w == 0:
            ans += S[i]
    return ans
    
if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

S = input()
w = int(input())

if len(S) / w == len(S) // w:
    length = len(S) // w
else:
    length = len(S) // w + 1

for i in range(length):
    print(S[w * i], end = "")

Submission status: Accepted

Solution code:
s=input()
d=""
n=int(input())
for i in range((len(s)+n-1)//n):
	d+=s[i*n]
print(d)

Submission status: Accepted

Solution code:
import math
S = input()
w = int(input())
k = []
ans = ""
ans_2 = ""
for i in range(math.ceil(len(S)/w)):
  ans += S[i*w]
print(ans)

Submission status: Accepted

Solution code:
s = input()
print(s[::int(input())])

Submission status: Accepted

Solution code:
S = input()
w = int(input())
r = "".join(S[::w])
print(r)

Submission status: Accepted

Solution code:
def solve(s, w):
    return "".join([s[i] for i in range(0, len(s), w)])

s = input()
w = int(input())
print(solve(s, w))

Submission status: Accepted

Solution code:
s = input()
w = int(input())
for i in range(0,len(s), w):
    print(s[i], end='')

Submission status: Accepted

Solution code:
S=input()
w=int(input())
ans=''
for i,s in enumerate(S):
    if not i%w:
        ans+=s
print(ans)

Submission status: Accepted

Solution code:
S = input()
w = int(input())
ans = ""
for i in range(0, len(S), w):
    ans += S[i]
print(ans)

Submission status: Accepted

Solution code:
S = str(input())
w = int(input())
ans = ""
for i in range(0, len(S), w):
    ans += S[i]
print(ans)

Submission status: Accepted

Solution code:
s = list(input())
w = int(input())
l = []
for i in range(len(s)):
    if i % w == 0:
        l.append(s[i])
for x in l:
    print(x,end="")

Submission status: Accepted

Solution code:
S = input()
w = int(input())

newS =[""]
i = 0

while i<len(S):
    newS.append(S[i])
    i = i+w

print("".join(newS))

Submission status: Accepted

Solution code:
S = input()
w = int(input())

newS = [""] * ((len(S) - 1 + w) // w)

for i in range(len(newS)):
    newS[i] = S[w * i]

print("".join(newS))

Submission status: Accepted

Solution code:
def main():
    S = input()
    w = int(input())
    print(S[::w])


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S=input()
N=int(input())
ans=""
k=0
for i in S:
        if k%N==0:
                ans+=i
        k+=1
print(ans)

Submission status: Accepted

Solution code:
s = input()
w = int(input())
for i in range((len(s)+w-1)//w):
    print(s[w*i],end="")

Submission status: Accepted

Solution code:
S = input()
w = int(input())
O = []

i = 0
while i < len(S):
    O.append(S[i])
    i += w

print("".join(O))

Submission status: Accepted

Solution code:
S = str(input())
w = int(input())
ans = ""
for i in range(0,len(S),w):
    ans += S[i]
print(ans)

Submission status: Accepted

Solution code:
s = input()
w = int(input())

print(s[0::w])

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = ''

for i in range(0, len(s), w):
    ans += s[i]

print(ans)

Submission status: Accepted

Solution code:
S = input()
W = int(input())

print(S[::W])

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = ''
for i in range(len(s)):
    ans+=s[i*w]
    if (i+1) * w > len(s) - 1:
        break
print(ans)

Submission status: Accepted

Solution code:
# soundhound2018-summer-qualB - Acrostic
def main():
    s = input()
    w = int(input())
    print(s[::w])


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s=input()
w=int(input())
n=len(s)//w
b=[]
if len(s)%w==0:
    for i in range(n):
        b.append(s[i*w])
else:
    for i in range(n+1):
        b.append(s[i*w])
print(''.join(b))

Submission status: Accepted

Solution code:
S = input().rstrip()
w = int(input())
print(S[0::w])

Submission status: Accepted

Solution code:
S, w = input(), int(input())
ans = ""
for i in range(len(S)):
	if i % w == 0:
		ans += S[i]
print(ans)

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = ""
i = 0
while i*w<len(s):
    ans +=s[i*w]
    i += 1
    if i*w >=len(s):
        break
print(ans)

Submission status: Accepted

Solution code:
S = input()
w = int(input())

ans = ''
for i in range(0, len(S), w):
    ans += S[i]

print(ans)

Submission status: Accepted

Solution code:
s = input()
w = int(input())
for i in range(len(s)//w+1):
    if i*w < len(s):
        print(s[i*w], end="")
print()

Submission status: Accepted

Solution code:
print(''.join(input()[::int(input())]))

Submission status: Accepted

Solution code:
s = str(input())
w = int(input())
print(s[0::w])

Submission status: Accepted

Solution code:
###template###
import sys
def input(): return sys.stdin.readline().rstrip()
def mi(): return map(int, input().split())
###template###

S = input()
w = int(input())

print(S[::w])

Submission status: Accepted

Solution code:
S = input()
w = int(input())
L = []
for i in range(len(S)):
        if i%w == 0:
                L.append(S[i])
print("".join(L))

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools, random
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; ansli = []; tmpli = []; candili = []
eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
"""for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""
def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]#WideIntPoint
def ws(): return sys.stdin.readline().split()
def i(): return int(sys.stdin.readline())
def s(): return input()
def hi(n): return [i() for _ in range(n)]
def hs(n): return [s() for _ in range(n)]#HeightString
def mi(n): return [wi() for _ in range(n)]#MatrixInt
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]

s = s()
w = i()
cnt = 1
t = ""
for i in range(len(s)):
    if (cnt - 1) % w == 0:
        t += s[i]
    cnt += 1

print(t)

Submission status: Accepted

Solution code:
s = input().rstrip()
w = int(input())

print(s[::w])

Submission status: Accepted

Solution code:
S=input()
w=int(input())
a=len(S)
b=0
while b<=a-1:
        print(S[b],end="")
        b+=w

Submission status: Accepted

Solution code:
S = input()
w = int(input())

ans = S[::w]
print(ans)

Submission status: Accepted

Solution code:
S = input()
w = int(input())

ans = ""
for i in range((len(S) + w - 1) // w):
    ans += S[i * w]

print(ans)

Submission status: Accepted

Solution code:
s=input()
n=int(input())
for i in range(0,len(s),n):
  print(s[i],end="")

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = ''
count = 0
while count <= len(s)-1:
  ans += s[count]
  count += w
print(ans)

Submission status: Accepted

Solution code:
s,n=input(),int(input());ans=""
for i in range(len(s)):
  if i%n==0:ans+=s[i]
print(ans)

Submission status: Accepted

Solution code:
S = input()
w = int(input())

moji = ''

for i in range(len(S)):
    if i%w==0:
        moji += S[i]
print(moji)

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = ""
for i in range(0,len(s),w):
  ans += s[i]
print(ans)

Submission status: Accepted

Solution code:
s = str(input())
w = int(input())
print(s[::w])

Submission status: Accepted

Solution code:
s=list(input())
w=int(input())
print(''.join(s[::w]))

Submission status: Accepted

Solution code:
from sys import stdin
moji=(stdin.readline().rstrip())
N=int(stdin.readline().rstrip())
ans=moji[0]
ite=len(moji)
for i in range(1,ite+1):
    if i*N > len(moji)-1:
        break
    ans=ans+moji[i*N]
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from math import ceil
S = input()
w = int(input())
print(''.join(S[i * w] for i in range(ceil(len(S) / w))))

Submission status: Accepted

Solution code:
import math
s = input()
w = int(input())
n = len(s)
ans = ''
for i in range(math.ceil(n/w)):
  ans += s[w*i]
print(ans)

Submission status: Accepted

Solution code:
S = input()
w = int(input())
list_w = []
for i in range(0,len(S),w):
  list_w.append(S[i])
print(''.join(list_w))

Submission status: Accepted

Solution code:
n=input()
s=int(input())
t=len(n)//s
c=""
for i in range((t+1 if len(n)%s!=0else t)):
    c+=n[i*s]
print(c)

Submission status: Accepted

Solution code:
s = input()
w = int(input())
a = ""
for i,j in enumerate(s):
  if i % w == 0:
    a += j
print(a)

Submission status: Accepted

Solution code:
L = list(input())
N = int(input())
ANS = []
for i in range(len(L)) :
    if i % N == 0 :
        ANS.append(L[i])
ans = "".join(ANS)
print(ans)

Submission status: Accepted

Solution code:
S = input()
N = int(input())
print(*(S[i] for i in range(0, len(S), N)), sep='')

Submission status: Accepted

Solution code:
s=input()
w=int(input())
a=[]
for i in range(len(s)):
  if i%w==0:a.append(s[i])
print(''.join(a))

Submission status: Accepted

Solution code:
i=input;print(i()[::int(i())])

Submission status: Accepted

Solution code:
s = str(input())
w = int(input())
print(s[::w])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
B - Acrostic
https://beta.atcoder.jp/contests/soundhound2018-summer-qual/tasks/soundhound2018_summer_qual_b

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    S = input().strip()
    w = int(input())
    ans = [S[i] for i in range(0, len(S), w)]
    print(''.join(ans))


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
import math

s = list(input())
w = int(input())
A = []
for k in range(int(math.ceil(len(s)/w))):
  A.append(s[k*w])
print(''.join(A))

Submission status: Accepted

Solution code:
def ip():
    return int(input())
    
def ipp():
    return map(int,input().split())
    
def sar():
    return list(ipp())
    
def pars(a):
    print(''.join(list(map(str, a))))
    print('\r')
    
def parl(a):
    print('\r'.join(list(map(str, a))))
    print('\r')
    
#template ends   

if __name__=='__main__':
    T=1
    #T=int(input().strip())
    for _ in range(T):
        s = input()
        k = ip()
        for i in range(0,len(s),k):
            print(s[i], end="")

Submission status: Accepted

Solution code:
S = input().strip()
w = int(input())

ans = S[::w]
print(ans)

Submission status: Accepted

Solution code:
a = input()
b = int(input())

c = ''
for i in range(len(a)):
	if(i%b == 0):
		c += a[i]
		
print (c)

Submission status: Accepted

Solution code:
s = input()
w = int(input())
i = 0
ans = ''
while i < len(s):
  ans += s[i]
  i += w
print(ans)

Submission status: Accepted

Solution code:
s=input()
n=int(input())
a=[]
for i in range(0,len(s),n):
	a.append(s[i])
print(*a,sep="")

Submission status: Accepted

Solution code:
S = input()
W = int(input())

for i in range(len(S)):
  if i % W == 0:
    print(S[i], end='')
print()

Submission status: Accepted

Solution code:
S = input()
N = int(input())

for s in S[::N]:
  print(s, end='')
print()

Submission status: Accepted

Solution code:
S = input()
w = int(input())

m = ""
for i in range(0, len(S), w):
    m += S[i]
print(m)

Submission status: Accepted

Solution code:
s = input()
w = int(input())

i = 0
r = ""
while i < len(s):
  r += s[i]
  i += w
  
print(r)

Submission status: Accepted

Solution code:
S = str(input())
w = int(input())

if len(S) % w == 0:
    L = len(S) // w
else:
    L = len(S) // w + 1

moji = str()

for i in range(L):
    moji = moji + S[i* w]

print(moji)

Submission status: Accepted

Solution code:
def main():
    S = input()
    w = int(input())

    ans = S[::w]
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
w = int(input())

l = ''

c = 0
while c < len(s):
    l += s[c]
    c += w

print(l)

Submission status: Accepted

Solution code:
str = input()
window = int(input())
print(str[::window])

Submission status: Accepted

Solution code:
S = list(input())
w = int(input())
print(''.join(S[0::w]))

Submission status: Accepted

Solution code:
import sys

S = input()
w = int(input())

for index, s in enumerate(S):
    if index % w == 0:
        sys.stdout.write(s)

Submission status: Accepted

Solution code:
s = input()
mod = int(input())
for i in range(len(s)):
    if i%mod==0: print(s[i],end="")
print()

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = ""
for i in range(0,len(s),w): ans+=s[i]
print(ans)

Submission status: Accepted

Solution code:
s = input()
w = int(input())

length = len(s)

output = s[0]
i = w

while(i<length):
    output += s[i]
    i += w

print(output)

Submission status: Accepted

Solution code:
S = input()
w = int(input())
print(S[0:len(S):w])

Submission status: Accepted

Solution code:
s = raw_input()
w = int(raw_input())

ss = ''

for i in xrange(0, len(s), +w): ss += s[i]

print ss

Submission status: Accepted

Solution code:
s=input()
l=int(input())
x=''
for i in range(len(s)):
        if i%l==0:
                x+=s[i]
print(x)

Submission status: Accepted

Solution code:
S = input()
w = int(input())

SS = S[::w]
print(SS)

Submission status: Accepted

Solution code:
S = input()
w = int(input())
print(S[0:len(S):w])

Submission status: Accepted

Solution code:
a = list(input())
b = int(input())
if len(a)%b == 0:
  for i in range(len(a)//b):
    print(a[i*(b)],end="")
else:
  for i in range(len(a)//b+1):
    print(a[i*(b)],end="")

Submission status: Accepted

Solution code:
st = input()
skpe = int(input())
st_len = len(st)
count = (st_len // skpe) + 1
top_list = []
s = ""

for i in range(count):
    top_list.append(st[skpe * i:skpe * i + skpe])


for x in top_list:
    try:
        s += x[0]
    except IndexError:
        pass
print(s)

Submission status: Accepted

Solution code:
def main():
    S = input()
    w = int(input())
    output = ""
    for i in range(len(S)):
        if i%w == 0:
            output += S[i]
    return output

if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
S,w=input(),int(input())
N=0
while N<len(S):
   print(S[N],end="")
   N+=w

Submission status: Accepted

Solution code:
l = []
l += input()
n = int(input())
ans = []
for i in range((len(l) - 1) // n + 1):
    ans += l[i*n]
print("".join(ans))

Submission status: Accepted

Solution code:
# coding: utf-8

s = input()
w = int(input())

for i,c in enumerate(s):
    if i % w == 0:
        print(c, end="")

print()

Submission status: Accepted

Solution code:
S = input()
w = int(input())

ans = str()
for i in range(0, len(S), w):
    ans += S[i]

print(ans)

Submission status: Accepted

Solution code:
S = str(input())
w = int(input())

ans = ''

for i in range(0, len(S), w):
    ans += S[i]

print(ans)

Submission status: Accepted

Solution code:
S = input()
w = int(input())

print(S[0::w])

Submission status: Accepted

Solution code:
S = list(input())
w = int(input())

r = ''
for i in range(0, len(S), w):
    r += S[i]
print(r)

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = ''
for i in range(0, len(s), w):
  ans += s[i]

print(ans)

Submission status: Accepted

Solution code:
s = input()
w = int(input())
ans = ''
for i in range(0 ,len(s) , w):
  ans += s[i:i+w][0]

print(ans)

Submission status: Accepted

Solution code:
S = input()
w = int(input())

word = ""
for i,s in enumerate(S):
    if i%w == 0:
        word += s

print(word)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# 文字列の入力
s = raw_input()

# 整数の入力
a = int(raw_input())

r=list(s)[::a]
print ''.join(r)

Submission status: Accepted

Solution code:
s = raw_input()
k = int(raw_input())
print s[::k]

Submission status: Accepted

Solution code:
s = input()
n = int(input())

print(s[::n])

Submission status: Accepted

Solution code:
s = input()
w = int(input())
print(''.join([c for i, c in enumerate(list(s)) if i % w == 0]))

Submission status: Accepted

Solution code:
S = list(input())
w = int(input())

print(''.join([x for x in S[::w]]))

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
s = input()
w = int(input())

ans = [s[i] for i in range(len(s)) if i % w == 0]
print("".join(ans))

Submission status: Accepted

Solution code:
s = input()
w = int(input())
n = len(s)
ans = []
now = 0
while now<n:
  ans.append(s[now])
  now += w
for i in range(len(ans)):
  if i != len(ans)-1:
    print(ans[i],end='')
  else:
    print(ans[i])

Submission status: Accepted

Solution code:
S = input()
w = int(input())

print("".join(map(str, S[::w])))

Submission status: Accepted

Solution code:
import math
S = input()
w = int(input())
stack = []
for x in range(math.ceil(len(S)/w)):
    stack.append(S[x*w])
print("".join(stack))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


if __name__ == '__main__':
    s = input()
    w = int(input())
    print(''.join(map(str, s[::w])))