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:
def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()
    
    array_result.append(data.split(" "))

    flg = 1

    try:

        while flg:

            data = input()
            if(data != ""):
                
                array_result.append(data.split(" "))

            else:

                flg = 0
    finally:

        return array_result

arr_data = getinputdata()

s= arr_data[0][0]
w= int(arr_data[1][0])

result=[s[i] for i in range(0,len(s),w)]

print("".join(result))

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())
n=int(input())
ans=""
ans=ans.join(s[::n])
print(ans)

Submission status: Accepted

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

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

ans = ans + (s[i:])[0]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

for x in v:
    print(x[0], end='')
print('\n')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
s = input()
w = int(input())

a = len(s)//w + 1 if len(s) % w != 0 else len(s)//w

ans = [s[w*i] for i in range(a)]
print(reduce(lambda a, b: a+b, ans))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()
w = int(input())
iter = int((len(S) - 1) / w) + 1
s = ''

for i in range(iter):
    s += S[w*i]

print(s)

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(len(S)):
    if i % w == 0:
        ans += S[i]

print(ans)

Submission status: Accepted

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

SL=len(S)
ans=''

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

print(ans)

Submission status: Accepted

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

c = (len(S)+w-1)//w 
t = 0
Ans =""
while t < c:

  Ans =Ans + S[w*t]
  t += 1

print(Ans)

Submission status: Accepted

Solution code:
s=str(input())
k=int(input())
j=0
s1=''
for i in range(0,len(s),k):
    s1+=s[i]
print(s1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

res = ''
i = 0
while i<len(S):
    res += S[i]
    i+=w

print res

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
a = stdin.readline().strip()
n  = int(stdin.readline())
ans = ''
m = len(a)
for  i in xrange(m):
 if i%n==0:
  ans += a[i]
print ans

Submission status: Accepted

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

Submission status: Accepted

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

print (A)

Submission status: Accepted

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

ans_list = list()
ans = ' '

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

for x in ans_list:
	ans += x

print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def output(string, digit):
    _output=""
    for i in range(len(string)):
        if i%digit==0:
            _output=_output+string[i]
        else: pass
    return _output

s=str(input())
d=int(input())
print(output(s, d))

Submission status: Accepted

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

Submission status: Accepted

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

import sys
j=0
result=""
while True:
 try:
  result+=S[j]
  j+=w
 except:
  print(result)
  sys.exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
line = input()
n = int(input())
result = ''
idx = 0
while idx < len(line):
    result = result + line[idx]
    idx = idx + n
print(result)

Submission status: Accepted

Solution code:
def main():
    s_i = input()
    n_i = int(input())
    ans = ""
    while True:
        if len(s_i) < n_i:
            if s_i != "":
               ans += s_i[0]
               break
            else:
                break
        else:
            ans += s_i[:n_i][0]
            s_i = s_i[n_i:]
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

result = ""
for i in xrange((len(s) / w)):
  result += s[i * w]
  
if len(s) % w != 0:
  result += s[-(len(s) % w)]
print result

Submission status: Accepted

Solution code:
s=input()
w=int(input())
t=0
a=""
while t<len(s):
    a=a+s[t]
    t=t+w
print(a)

Submission status: Accepted

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

data = list(input())
c = int(input())
res = ""
for i in range(len(data)):
    if i % c == 0:
        res = res + data[i]
print(res)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
S = input()
w = int(input())
x = 0

S_list = list(S)

sys.stdout.write(S_list[0])
while True:
    x = x + w
    if x >= len(S_list):
        break
    sys.stdout.write(S_list[x])

Submission status: Accepted

Solution code:
string = input()
# print(string)
# string = string[0]
# num = int(string[1])

num = int(input())
# num = int(l[1])
# print(string)
if num == 0:
    out = string
    print(out)
else:
    out=string[0]
    for i in [i for i in range(len(string))]:
        if i != 0:
            if i%num == 0:
                out=out+string[i]
    print(out)

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:
if __name__ == "__main__":
	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 = list(input().strip())
w = int(input())
ans = ""
for i in range(0, len(s)):
    if(i % w == 0):
        ans += s[i]
print(ans)

Submission status: Accepted

Solution code:
S = input()
w = int(input())
ans = ''
counta = 0

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

print(ans)

Submission status: Accepted

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

L = len(S)

ans = []

for i in range(0,L,w):
	if i <= L-1:
		ans.append(S[i])


print (''.join(ans))

Submission status: Accepted

Solution code:
import math
S = input()
w = int(input())
n = math.ceil(len(S)/w)
print(''.join([S[i*w] for i in range(0,n)]))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(answer)

Submission status: Accepted

Solution code:
str = input()
w = int(input())
res = ""

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

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
w = int(input())
ans =""
while (len(S)>w):
	ans += S[0]
	#print(S)
	S = S[w:]
ans+=S[0]
print(ans)

Submission status: Accepted

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

print(''.join([c for i, c in enumerate(list(in_str)) if i % w == 0]))

Submission status: Accepted

Solution code:
#coding:utf-8

s = input()
n = int(input())
lens = len(s)

if lens % n != 0:
    lens += 1
    
string = ""
for i in range(0,lens,n):
    string += s[i]

print(string)

Submission status: Accepted

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

Submission status: Accepted

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

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

ss = [s[i: i+w] for i in range(0, len(s), w)]
sss = [i[0] for i in ss]
print(''.join(sss))

Submission status: Accepted

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

a,b = divmod(len(S),w)
v = []
for i in range(a):
    v.append(S[i*w:(i+1)*w])
if b > 0:
    v.append(S[(i+1)*w:])

out = ''
for l in v:
    out = out + l[0]
print(out)

Submission status: Accepted

Solution code:
S = list(input())
w = int(input())
ans = ""
for i in range(len(S)):
    if i * w >= len(S):
        break
    ans = ans + S[i * w]

print(ans)

Submission status: Accepted

Solution code:
n=list(input())
m=int(input())
moji=" "
i=0
while i<len(n):
    moji=moji+n[i]
    i=i+m
print(moji)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

i = 0
out = ""
while i < len(S):
    out += S[i]
    i += w
print(out)

Submission status: Accepted

Solution code:
a = input()
n = int(input())						# 5

for i in range( (len(a)+n-1)//n ):
	print(a[i*n], end='')
#	print(i)
print("")

Submission status: Accepted

Solution code:
x =raw_input()
b = raw_input()

num = int(b)

y = list(x)

z=[]

if (len(y)%num) ==0:
    numy = len(y)/num
else:
    numy = len(y)/num+1

moji = ""
for i in range(numy):
    z.append( y[i*num])
    moji = moji + z[i]

print moji

Submission status: Accepted

Solution code:
import math
S=str(input())
w=int(input())
l=len(S)
a=list(S)
b=math.ceil(l/w)
c=[]
for i in range(0,b):
    c.append(S[w*i])
print("".join(c))

Submission status: Accepted

Solution code:

line = input()
w = int(input())

out = ""

div = len(line) // w
mod = len(line) % w

for i in range(div):
    out += line[i*w]

if mod != 0:
    out += line[div*w]

print(out)

Submission status: Accepted

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

l = len(S)

if l % w == 0:
    N = l // w
else:
    N = l // w + 1

ans = ''

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

Submission status: Accepted

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

L = len(S)
A = []
for i in range(0,L) :
    if i % w == 0 :
        a = S[i]
        A.append(a)

ans = ''.join(A)
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/python3

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

index = 0
res = ""
while index < len(S):
    if index % w == 0:
        res += S[index]
    index += 1
print(res)

Submission status: Accepted

Solution code:
word=list(input())
n=int(input())
ans=[]
for i in range (0,len(word),n):
    ans.append(word[i])
ans=''.join(ans)
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=list(input())

w=int(input())

l=len(s)
ans=[]

for i in range(l):
    if i%w==0:
        ans.append(s[i])

print(''.join(ans))

Submission status: Accepted

Solution code:
s=str(input())
n= int(input())
b=0
a=''
for i in range(len(s)):
	if i%n==0:
		a=a+s[i]
		
print(a)

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:
S=input()
w=int(input())
list1=[]
m=0
while w*m<=len(S)-1:
    list1.append(S[w*m])
    m+=1
for i in range(len(list1)):
    print(list1[i],end="")

Submission status: Accepted

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

Submission status: Accepted

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

S_len = len(S)

n = int(S_len)//int(w)
n_sub = int(S_len)%int(w)

if n_sub != 0:
    n += 1

S_ans = []
temp = 0
for i in range(n):
    S_ans.append(S[(i)*(int(w))])
    temp += 1
    if temp == n:
        break

mojiretu = ''
for x in S_ans:
    mojiretu += x

print(mojiretu)

Submission status: Accepted

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

Submission status: Accepted

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

while len(s) > 0:
    if len(s) >= w:
        ans += s[0]
        s = s[w:]
    elif len(s) < w:
        ans += s[0]
        break

print(ans)

Submission status: Accepted

Solution code:
S = list(input())
w = int(input())
S2= str()
j=0

for i in range( -( -len(S)//w) ):
    S2+=S[j]
    j=j+w
    
print(S2)

Submission status: Accepted

Solution code:
S = input()
w = input()
list_s = list(S)
sento = [list_s[x] for x in range(0,len(list_s),int(w))] 
print(''.join(sento))

Submission status: Accepted

Solution code:
s = input()
w = int(input())
counter = 0
output = ""
while (len(s)/w) > counter:
    output += s[w*counter]
    counter += 1
print(output)

Submission status: Accepted

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

print(r)

Submission status: Accepted

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

S = str(input())
w = int(input())
ans = ''

for ind, letter in enumerate(S):
    if ind % w == 0:
        ans += letter
    else:
        pass
    
print(ans)

Submission status: Accepted

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

newS = ""
if len(S) % w == 0:
    for i in range(len(S)//w):
        Si = S[i * w]
        newS += Si
else:
    for i in range(len(S)//w + 1):
        Si = S[i * w]
        newS += Si

print(newS)

Submission status: Accepted

Solution code:
s = str(input())
w = int(input())
d=list(s)
if len(d)%w==0:
  a = int(len(d)/w)
else:
  a = int(len(d)/w)+1
e=[]
for i in range(a):
    e.append(s[i*w])
f = ''
 
for x in e:
    f += x
    
print(f)

Submission status: Accepted

Solution code:
s = input()
w = int(input())
s0 = s[0]
k = w
while k < len(s):
    s0 += s[k]
    k += w
print(s0)

Submission status: Accepted

Solution code:
from sys import stdin

S = stdin.readline().rstrip()
w = int(stdin.readline().rstrip())

s = ''

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

print(s)

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:
result = []
S = input()
w = int(input())
S_li = list(S)
for i in range(len(S_li)):
    if(i % w == 0):
        result.append(S_li[i])
for i in range(len(result)):
    print(result[i],end="")

Submission status: Accepted

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

def main():
    #入力
    S = str(input())
    w = int(input())

    for i in range(len(S)):
        #print(S[count], end="")
        if i % w == 0:
            print(S[i], end='')

    print('\n', end = '')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
w = int(input())
li = [S[w*i] for i in range((len(S)-1)//w + 1)]
result = ''.join(li)

print(result)

Submission status: Accepted

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

Submission status: Accepted

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


ans = ""

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

print(ans)

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:
def main():
    S = raw_input()
    w = int(raw_input())

    s = ''
    for i in enumerate(S):
        if i[0]%w == 0:
            s += i[1]

    print s

main()

Submission status: Accepted

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

Submission status: Accepted

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

out = ''

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

print(out)

Submission status: Accepted

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

print(S[0::w])

Submission status: Accepted

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

result = ""

word = list(S)

for i in range((len(word)-1) // w + 1):
    result += word[w*i]

print(result)

Submission status: Accepted

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

result = []
for i in range(len(s)):
  if i % w == 0:
    result.append(s[i])

print("".join(result))

Submission status: Accepted

Solution code:
S = list(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())
if len(s)%w == 0:
    num = int(len(s)/w)
else:
    num = int(len(s)/w)+1
start = [w*i for i in range(num)]
moji = []
for i in start:
    moji.append(s[i])
print("".join(moji))

Submission status: Accepted

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

res=""
cnt=0
for c in s:
    if cnt == 0:
        res = res + c
    cnt+=1
    if cnt == w:
        cnt=0

print(res)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    line = input()
    width = int(input())

    answer = ''.join(line[i] for i in range(0, len(line), width))
    print(answer)

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    S = str(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())

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

s = []

while len(S) > 0:
    s.append(S[:w])
    S = S[w:]

ans = ''.join(list(map(lambda x:x[0], s)))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

output=[]

for i in range(len(S)):
  if i%N==0:
    output.append(S[i])
    
output2 = ''.join(output)

print(output2)

Submission status: Accepted

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

Submission status: Accepted

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

list1=[]

if len(S)%n>=1:
    A=1
elif len(S)%n==0:
    A=0
    
for i in range(len(S)//n+A):
    list1.append(S[0+n*i])

ans="".join(list1)
print(ans)

Submission status: Accepted

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

x = ''.join([s[w*i] for i in range(-((-N)//w))])

print(x)

Submission status: Accepted

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

Submission status: Accepted

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

w = [i for i in w]
head = w[::S]
print(''.join(head))

Submission status: Accepted

Solution code:
import math

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

n = math.ceil(len(s)/w)

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

Submission status: Accepted

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

Submission status: Accepted

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

ans=[]
i=0
while i<len(S):
  ans.append(S[i])
  i+=w
ans=''.join(ans)
print(ans)

Submission status: Accepted

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

if len(s) % w == 0:
    M = len(s) // w
else:
    M = len(s) // w + 1

if w == 1:
    print(s)
else:
    ans = ""
    for i in range(0, M):
        ans += s[i*w]

    print(ans)

Submission status: Accepted

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

ans =str[::w]

print(ans)

Submission status: Accepted

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

W = [str(WW) for WW in W]
words = list()

for i,Ws in enumerate (W):
    if i%S==0:
        words.append(Ws)

words = ''.join(words)
print(words)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

num =math.ceil(len(s) / w)
# print(num)
index = list(range(0, num*w, w))
# print(index)
list_ = []
for i in index:
  list_.append(s[i])

print(''.join(list_))

Submission status: Accepted

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

ans = ""
index = 0
while(index < len(S)):
    ans += S[index]
    index += W
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#
import sys
import math
import numpy as np
import itertools


a = input()
b = int(input())
x = [a[i:i+1] for i in range(len(a))]
#print(x)
for i in range(len(a)):
    if i % b == 0 :
        print(x[i], end='')
print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def split_str(s, n):
  length = len(s)
  return [s[i:i+n] for i in range(0, length, n)]

splited_list = split_str(s, w)
output_str = ''

for word in splited_list:
  output_str += str(word)[0]

print(output_str)

Submission status: Accepted

Solution code:
# your code goes here
#N=int(input())
#l = list(map(int,input().split()))
s=list(input())
w=int(input())
a = ''
i = 0
while w * i + 1 <= len(s):
	a = a + s[w*i]
	i = i +1
print(a)

Submission status: Accepted

Solution code:
s=input()
w=int(input())
res=""
for i in range(len(s)):
    if(w*i>=len(s)):
        break
    res+=s[w*i]
print(res)

Submission status: Accepted

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

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

first_char_list = [string[0] for string in splitted_S]
print(''.join(first_char_list))

Submission status: Accepted

Solution code:
s = input()
w = int(input())
b=[s[a] for a in range(0, len(s), w)]
x = ''
for y in b:
    x += y
print(x)

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())
res = ""

for i in range(int(len(S) / w) + 1):
    if i * w < len(S):
        res += S[i * w]

print(res)

Submission status: Accepted

Solution code:
s = input()
n = int(input())
m = 0
l = ''
if len(s) % n == 0:
	m = len(s) // n
else:
	m = len(s) // n + 1

for i in range(m):
	l = l + s[n * i]

print(l)

Submission status: Accepted

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

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

    print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(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:
import math

S = input()
w = int(input())
ans = ""
for i in range(math.ceil(len(S)/w)):
  ans += S[i*w]

print(ans)

Submission status: Accepted

Solution code:
import math

line = list(input())

#print(line)

w = int(input())

n = math.ceil(len(line) / w)

ini = []

for i in range(n):
    ini.append(line[w*i])

print(''.join(ini))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = str(input(""))
w = int(input(""))
length = len(S)
max_l = length//w
if not length%w==0:
    max_l += 1
words = ""
for i in range(max_l):
    words += S[i*w]
print(words)

Submission status: Accepted

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

string = S[0]
for i,s in enumerate(S[1:]):
    if (i+1)%w==0:
        string += s

print(string)

Submission status: Accepted

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

res = ""

for i,data in enumerate(s):
    if (i % w == 0) :
        res += data
        
print(res)

Submission status: Accepted

Solution code:
#Q_B
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())
x = len(S)
w = int(input())
if x % w == 0:
	num = x // w
else:
	num = (x // w) + 1
word = ""

for i in range(num):
	word += S[w * i]

print(word)

Submission status: Accepted

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

i = 0
while i < len(S):
    print(S[i], end="")
    i += 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:
if __name__ == '__main__':
  S = input()
  w = int(input())
  result = "".join([S[id] for id in range(0, len(S), w)])
  print(result)

Submission status: Accepted

Solution code:
S = input()
LS = list(S)
w = int(input())
c = LS[0]
l = 1
while l*w + 1 <= len(S):
    c += LS[l*w]
    l += 1
print(c)

Submission status: Accepted

Solution code:
s=input()
w=int(input())
c=0
while c!=len(s):
    if c%w!=0:
        pass
    else:
        print(s[c],end="")
    c+=1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
w = int(input())
counter = 0
ans = []
for l in s:
   if counter == 0:
      ans.append(l)
   counter += 1   
   if counter == w:
      counter = 0

print("".join(ans))

Submission status: Accepted

Solution code:
s=raw_input()
w=int(raw_input())
a=[]
for i in range(0,len(s),w):
 a.append(s[i:i+w])
c=[]
for i in range(len(a)):
 c.append(a[i][0])
print ''.join(c)

Submission status: Accepted

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

ans = ""
for i in range(len(S)):
    if i == 0:
        ans += S[i]
        continue
    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:
#!/usr/bin/env python
# coding: utf-8
#


def main(S, w):
    l = list(S)
    index = 0
    retval = ''
    while index < len(l):
        retval = retval + l[index]
        index += w
    print(retval)
    

if __name__ == '__main__':
    try:
        S = input().strip()
        w = int(input().strip())
        main(S, w)
    except EOFError:
        pass

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
w = int(input())
counter = 1
res = ''
if w == 1:
    print(''.join(S))
else:
    for i in S:
        if counter == 1:
            res = res + i
            counter += 1
        elif counter == w:
            counter = 1
        else:
            counter += 1
    print(res)

Submission status: Accepted

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

l = "a"
i = 0
while True:
    try:
        l += S[i * w]
        i += 1
    except:
        break


print(l[1:])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input() #str型の標準入力
w = int(input())
a = list(s)
for i in range(len(a)):
    if i%w == 0:
        print(a[i],end="")

Submission status: Accepted

Solution code:
import sys

S = next(sys.stdin).strip()
w = int(next(sys.stdin))

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

Submission status: Accepted

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

i = 0
res = ''
while True:
    if i >= len(s):
        break
    res += s[i]
    i += w
print(res)

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 = ans + S[i]
print(ans)