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())
list_s = list(s)

i = 0
s = ''
while i < len(list_s):
    s += str(list_s[i])
    i += w
print(s)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jul  7 20:14:40 2018
SHPC_B
@author: maezawa
"""

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

n = len(s)
ans = []

for i in range(0,n,w):
    ans.append(s[i])
    
print(''.join(ans))

Submission status: Accepted

Solution code:
def main():
    s = input().strip()
    n = int(input())

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

    print(''.join([x[0] for x in xs]))
            
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

a = ""
for i in range((len(s) - 1) // w + 1):
    a += s[w * i]
print(a)

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def solve():
    s = input()
    d = int(input())
    print("".join(s[::d]))

if __name__=="__main__":
    solve()

Submission status: Accepted

Solution code:
s = raw_input().strip()
l = int(raw_input())
print s[::l]

Submission status: Accepted

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

l=len(S)

ans=""
for i in range(l):
	if i%w==0:
		ans+=S[i]

print ans

Submission status: Accepted

Solution code:
import math

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

times = math.ceil(len(s)/w)
ans = ''
for i in range(times):
  ans += s[i*w]

print(ans)

Submission status: Accepted

Solution code:
S = input()
w = int(input())
ans = ""
i = 0
while i < len(S):
    ans = ans + S[i]
    i = i + w

print(ans)

Submission status: Accepted

Solution code:
S = input()
n = int(input())
count = 0
ret = ''

for i, s in enumerate(S):
    if i % n == 0:
        ret += s

print(ret)

Submission status: Accepted

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

    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:
s = input()
w = int(input())

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

Submission status: Accepted

Solution code:
import math

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

for i in range( math.ceil(len(S)/w) ):
    print(S[i*w],end='')
print()

Submission status: Accepted

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

idx = 0
s_list = []
while idx < len(S):
    s_list.append(S[idx:idx + w])
    idx += w

s_join = []
for s in s_list:
    s_join.append(s[0])
print(''.join(s_join))

Submission status: Accepted

Solution code:
char = input()
num = int(input())

out = []
for i in range(0,len(char),num):
  out.append(char[i])

print("".join(out))

Submission status: Accepted

Solution code:
import math

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

S_list = list(S)
S_len = len(S)

for i in range(math.ceil(S_len / w)):
    print(S_list[i * w], end = "")

Submission status: Accepted

Solution code:
S = list(input())
w = int(input())
s = ''
for i, a in enumerate(S):
    if i%w == 0:
        s += a
else:
    print(s)

Submission status: Accepted

Solution code:
from sys import stdin, stdout
input = lambda: stdin.readline().rstrip()
write = stdout.write

def main():
    S = input()
    W = int(input())

    for i, s in enumerate(S):
        if not i % W:
            write(s)
    write('\n')

main()

Submission status: Accepted

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

answer = ''

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

print(answer)

Submission status: Accepted

Solution code:
S = input()
N = int(input())
print("".join([s for n, s in enumerate(S) if n % N == 0]))

Submission status: Accepted

Solution code:
def ketanowa(p):
    ans = 0
    p = str(p)
    for i in p:
        ans += int(i)
    return ans


def main():
    s = input()
    temp1 = input()
    temp1=int(temp1)
    ans=""
    # print(len(s))
    for i in range(0,len(s),temp1):
        # print(s[i])
        ans+=s[i] 
    print(ans)   

if __name__ == '__main__':
    main()

Submission status: Accepted

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

wlist = []
for i in range(0, len(words), w):
    wlist.append(words[i:i+w])
  
ans = ''
for wrd in wlist:
    ans += wrd[0]
  
print(ans)

Submission status: Accepted

Solution code:
S = list(raw_input())
w = int(raw_input())
ans = ''
for s in S[0::w]:
  ans += s
print ans

Submission status: Accepted

Solution code:
from math import ceil

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

ans = ''
n = ceil(len(S) / w)

for i in range(n):
    ans += S[i*w]
print(ans)

Submission status: Accepted

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

ans = ""

for i in range(math.ceil(len(s)/n)):
  ans += s[i*n]

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

S, = read_line(str)
n, = read_line(int)

print(S[::n])

Submission status: Accepted

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

S_list = list(S)
absS = len(S)
ans = []

for s in range(0, absS, w):
    ans.append(S_list[s])
    
print("".join(ans))

Submission status: Accepted

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

ret = ""

while True:
    ret += s[0]
    if len(s) < w + 1:
        break
    s = s[w:]

print(ret)

Submission status: Accepted

Solution code:
S=input()
w = int(input())
i=0
ans=[]
while True:
    ans.append(S[i])
    i += w
    if i >= len(S):
        break
print(''.join(map(str, ans)))

Submission status: Accepted

Solution code:
string = list(input())
# string = list('akiyasann')
# w = 3
w = int(input())
print(''.join(string[::w]))

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:
text = input()
length = int(input())

out = text[::length]
print(out)

Submission status: Accepted

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


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=[]
i=0

while(i<=len(S)-1):
  ans.append(S[i])
  i+=N

for i in range(len(ans)):
  print(ans[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())

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 = ""
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(0,len(s),w):
    print(s[i],end='')
print()

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
S = input()
w = int(input())

print(S[::w])

Submission status: Accepted

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

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

print(ret)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input())
N=int(input())
print("".join(s[::N]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    S = input()
    W = int(input())
    print(S[::W])


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
s = input()
w = int(input())
max = len(s)
ss = ''
for k in list(range(0,max,w)):
    ss += s[k]
print(ss)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
S=input()
n=int(input())
X=[]

for i in range(len(S)):
    if (i)%n==0:
        X.append(S[i])

ans=''.join(X)
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 = [i for idx, i in enumerate(s) if idx%w==0]

print("".join(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

i = 0
while i < len(s):
    print(s[i], end='')
    i += w
print('')

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    S = input()
    w = input()
    w = int(w)

    print(S[0::w])

Submission status: Accepted

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

Submission status: Accepted

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

count = 1
ans = s[0]

for i in s[1:]:
    if count == n:
        count = 0
        ans += i
    count += 1

print(ans)

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()
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 = input()
w = int(input())

ans = "" + S[0]

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

print(ans)

Submission status: Accepted

Solution code:
s = 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())

str = ""

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

Submission status: Accepted

Solution code:
s = input()
w = int(input())
i = 0
len_s = len(s)
while i < len_s:
    print(s[i], end='')
    i += w
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())
out=""
for num,i in enumerate(s):
    if num%w==0:
        out+=i
print(out)

Submission status: Accepted

Solution code:
input_line = input()
num_return = int(input())

print(input_line[::num_return])

Submission status: Accepted

Solution code:
import textwrap

s = input()
w = int(input())
ts = textwrap.wrap(s, w)
print("".join(t[0] for t in ts))

Submission status: Accepted

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

ps = ''
while s:
    ps += s[:w][0]
    s = s[w:]

print(ps)

Submission status: Accepted

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

Submission status: Accepted

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

i = 0
res = ''
while N > 0:
    res += S[i*w: (i+1)*w][0]
    i += 1
    N -= w
print(res)

Submission status: Accepted

Solution code:
def main():
    s, w = input(), int(input())

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = input()
w = int(input())
k = ""

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

print(k)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(s[::w])

Submission status: Accepted

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

Submission status: Accepted

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

for i,j in enumerate(S):
    if i % w == 0:
        ans += j
print(ans)

Submission status: Accepted

Solution code:
s = input()
b = int(input())
ans = ''
for i, v in enumerate(s):
    if i % b == 0:
        ans += v
print(ans)

Submission status: Accepted

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

a = list(input())
b = int(input())
ans = []
for i in range(0,len(a),b):
    ans.append(a[i])
print(''.join(ans))

Submission status: Accepted

Solution code:
#! /usr/bin/env python3

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

pos = 0
res = ""
while pos < len(s):
    res = res + s[pos]
    pos += w

print(res)

Submission status: Accepted

Solution code:
S = list(input())
w = int(input())
s = ''
i = 0
for c in S:
    if i % w == 0:
        s += c
    i+=1
print(s)

Submission status: Accepted

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

a = [S[i] for i in range(0, len(S), w)]
print(''.join(a))

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations

sys.setrecursionlimit(10000)


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(S, w):
    
    return S[::w]


def main():
    S = read_str()
    w = read_int()

    
    print(slv(S, w))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(X)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
w = int(input())
ans = ""
i = 0
while i < len(S):
    ans += S[i]
    i += w
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    s = raw_input().strip()
    w = input()
    print s[::w]


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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()
w = int(input())
i = 0
ans = ""
while i < len(S):
    ans+=S[i]
    i+=w
print(ans)

Submission status: Accepted

Solution code:
# encoding:utf-8
def main():
	s = input()
	w = int(input())
	cnt = 0
	ans = ""
	while True:
		if cnt >= len(s):
			break
		ans += s[cnt]
		cnt += w
	print(ans)

if __name__ == '__main__':
	main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
s=raw_input()
w=int(raw_input())
L=len(s)
i=0
while i<L:
  sys.stdout.write(s[i])
  i += w
sys.stdout.write('\n')

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())

new_str = ""

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

Submission status: Accepted

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

ans = str()
for i in range(n):
    if i % k == 0:
        ans += s[i]

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

tmp = []
for i, s in enumerate(S):
    if i % w == 0:
        tmp.append(s)
print("".join(tmp))

Submission status: Accepted

Solution code:
# coding: utf-8

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


print(s[::w])

Submission status: Accepted

Solution code:
def ilinp(): return list(map(int, input().split()))
def slinp(): return input().split()
def iinp(): return int(input())

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

Submission status: Accepted

Solution code:
import sys
import random

def rd():
        return sys.stdin.readline().rstrip()

def rdi():
        return [ int(x) for x in rd().split() ]

S = rd()
w, = rdi()

r = ""
while True:
        r = r + S[0]
        S = S[w:]
        if not S:
                break
print r

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())

cnt = 0
result = ""
while True:
    if cnt * w >= len(s):
        break
    result += s[cnt * w]
    cnt += 1
print(result)

Submission status: Accepted

Solution code:
s= raw_input()

w = int(input())

i = 0
ans = ""
while w*i < len(s):
	ans += s[w*i]
	i+= 1

print ans

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
lis = []
s = str(input())
n = int(input())
for i in range(math.ceil(len(s)/n)):
    lis.append(s[n * i])
print("".join(lis))

Submission status: Accepted

Solution code:

# a, b = map(int, input().split())
# c = list(map(int, input().split()))
# d = [list(map(int, input().split())) for _ in range(n)]
s = input()
w = int(input())
ans = ''

for i in range(len(s)):
    if i % w == 0:
        ans = 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]

print(ans)

Submission status: Accepted

Solution code:
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

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())
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 = ''
p = 0
while p < len(s):
    ans += s[p]
    p += w
print(ans)

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:
# coding: utf-8

S = input().strip()
w = int(input())
a = ""
for i in range(0, len(S), w):
    a += S[i]
print(a)

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]
print(ans)

Submission status: Accepted

Solution code:
# B
s = list(input())
k = int(input())
print("".join(s[0::k]))

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()
w = int(input())

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

Submission status: Accepted

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

ans = [c for i, c in enumerate(s) if i % n == 0]
print(''.join(ans))

Submission status: Accepted

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

Ans = ""
while S:
    T,S = S[0:w],S[w:]
    Ans += T[0]

print(Ans)

Submission status: Accepted

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

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()
w = int(input())
N=len(S)
ans=[]
for i in range(0,N,w):
    ans.append(S[i])
print(''.join(map(str,ans)))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()
w = int(input())
pos = 0
while True:
    print(S[pos], end='')
    pos += w
    if pos >= len(S):
        break
print()

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    s = input()
    w = int(input())
    ans = s[::w]
    print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

out = ''
for i, x in enumerate(S):
    if i % w == 0:
        out += x
        
print(out)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    s = input()
    w = int(input())
    print(s[::w])

Submission status: Accepted

Solution code:
s = input()
w = int(input())
n = len(s)
t = []
for p in range(0, n, w):
    t.append(s[p])

print(''.join(t))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
w = int(input())
ans = S[::w]
for a in ans:
    print(a, end="")
print()

Submission status: Accepted

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

print('')

Submission status: Accepted

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

result = S[::w]

print(result)

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().strip()
w=int(input().strip())
print(S[::w])

Submission status: Accepted

Solution code:
s = list(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(''.join([s[i] for i in range(len(s)) if i%w == 0]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print()

Submission status: Accepted

Solution code:
a = input()
n = int(input())
print(a[::n])

Submission status: Accepted

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

s = input()
w = int(input())
print(s[::w])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = raw_input()
w = int(raw_input())
print "".join(S[i] for i in xrange(0, len(S), w))

Submission status: Accepted

Solution code:
from sys import exit, setrecursionlimit, stderr
from functools import reduce
from itertools import *
from collections import defaultdict
from bisect import bisect

setrecursionlimit(10**6)

def read():
  return int(input())

def reads():
  return [int(x) for x in input().split()]

S = input()
w = read()

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

print(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys,collections,itertools,re,math,fractions,decimal,random,array,bisect,heapq

# decimal.getcontext().prec = 50
# sys.setrecursionlimit(10000)
# MOD = 10**9 + 7

def solve(f):
    s = f.read_str()
    w = f.read_int()
    return ''.join(s[::w])


class Reader(object):
    def __init__(self, filename=None):
        self.file = open(filename) if filename is not None else None
        self.case = 1

    def __readline(self):
        return self.file.next().strip() if self.file else raw_input()

    def next_case(self):
        self.file.next()
        self.case += 1

    def read_int(self): return int(self.__readline())
    def read_float(self): return float(self.__readline())
    def read_long(self): return long(self.__readline())
    def read_decimal(self): return decimal.Decimal(self.__readline())
    def read_str(self): return self.__readline()

    def read_int_list(self): return map(int, self.__readline().split())
    def read_float_list(self): return map(float, self.__readline().split())
    def read_long_list(self): return map(long, self.__readline().split())
    def read_decimal_list(self): return map(decimal.Decimal, self.__readline().split())
    def read_str_list(self): return self.__readline().split()

if __name__ == '__main__':
    filename = sys.argv[1] if len(sys.argv) > 1 else None
    f = Reader(filename)
    if f.file:
        while True:
            print "Case #%d\n"%f.case, solve(f)
            try:
                f.next_case()
            except StopIteration:
                break
    else:
        print solve(f)

Submission status: Accepted

Solution code:
S = raw_input()
w = int(raw_input())
ans = ''
for i in xrange(0, len(S), w):
    ans += S[i]
print ans

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string
import sys

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

Submission status: Accepted

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

s=input()
n=int(input())
print(s[::n])

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(10000)

# Debug output
def chkprint(*args):
    names = {id(v):k for k,v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

# Binary converter
def to_bin(x):
    return bin(x)[2:]

# --------------------------------------------

dp = None

def main():
    s = input()
    w = int(input())

    print(s[::w])

main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = str(input())
w = int(input())
idx = 0
ans = ""
while idx <= len(S):
  ans += S[idx]
  idx += w
print(ans)

Submission status: Runtime Error

Solution code:
S = str(input())
w = int(input())
idx = w
ans = ""
while idx <= len(S):
  ans += S[idx]
  idx += w
print(ans)

Submission status: Runtime Error

Solution code:
S = input()
W = int(input())
res = ''
for i in range((len(S) + W - 1) // W):
    res = ''.join((res, S[3 * i]))
print(res)

Submission status: Runtime Error

Solution code:
s = input()
w = int(input())
a = ''
for i in range(int(len(s)/w)+1):
  a += s[i*w]
print(a)

Submission status: Runtime Error

Solution code:
s = input()
w = int(input())
a = ''
for i in range(int(len(s)/w)+1):
  a += s[i*3]
print(a)

Submission status: Runtime Error

Solution code:
s = input()
w = int(input())
ans = []
asn.append(s[0])
for i in range(1,w//3+1):
  ans.append(s[w*i+1])
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
L = list(input())
w = int(input())
i = 0
while i<=len(L):
  print(L[i],end="")
  i+=3

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(ans)