Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

N = ii()
ans = 0
for i in range(1, N+1):
    ans += i * len(make_divisors(i))

print(ans)

Fixed submission:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N = ii()
ans = 0
for i in range(1, N+1):
    ans += (i * (N//i) + i) * (N//i) // 2

print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
from itertools import accumulate #list(accumulate(A))
import math
    
N, K = mi()
A = li()
 
#light = [0] * (N+2)
#A = [0] + A + [0]
#print(math.log(N, 2))
'''
thre = 0
for i in range(N):
    if A[i] < i:
        thre = max(thre, i-A[i])
'''
if K > pow(N, 0.5) + 1:
        for i in range(N):
            print(N, '', end='')
        print()
        exit()
 
 
for i in range(K):
    new = [0] * (N+1)
    for j in range(N):
        new[max(j-A[j], 0)] += 1
        new[min(j+A[j]+1, N)] += -1
        #print(new)
    new = list(accumulate(new))
    A = new[:N]
 
for i in range(N):
    print(A[i], '', end='')
print()

Fixed submission:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

S = input()

print(S[:3])
Buggy python submission (verdict: Runtime Error):
N = ii()
A = li()
ans = 1
for num in A:
    if ans < 10**18 / num:
        #print(ans, 10**18 / num)
        ans *= num
    else:
        if 0 in A:
            print(0)
        else:
            print(-1)
        exit()

print(ans)

Fixed submission:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N = ii()
A = li()
ans = 1
for num in A:
    ans *= num
    if ans > 10**18:
        if 0 in A:
            print(0)
        else:
            print(-1)
        exit()

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N = ii()
A = li()
ans = 1
for i in range(N):
    ans *= A[i]

if ans > 10**18:
    print(-1)
else:
    print(ans)

Fixed submission:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N = ii()
A = li()
ans = 1
for num in A:
    ans *= num
    if ans > 10**18:
        if 0 in A:
            print(0)
        else:
            print(-1)
        exit()

print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N = ii()
A = li()

max_a = [0] * (N+1)

max_a[0] = 1 - A[0]

for i in range(1, N+1):
    max_a[i] = max_a[i-1] * 2 - A[i]
    if max_a[i] < 0:
        print(-1)
        exit()

num = [0]*(N)
cnt = 0
tmp = A[-1]
for i in reversed(range(N)):

    if tmp <= max_a[i]:
        cnt += tmp
    else:
        cnt += max_a[i]
        tmp = max_a[i]

cnt += sum(A)

print(cnt+A[-2])

Fixed submission:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N = ii()
A = li()

if N == 0:
    if A==[1]:
        print(1)
    else:
        print(-1)
    exit()

max_a = [0] * (N+1)
max_a[0] = 1 - A[0]

for i in range(1, N+1):
    max_a[i] = max_a[i-1] * 2 - A[i]
    if max_a[i] < 0:
        print(-1)
        exit()

cnt_list = [0]*(N)
cnt_list[-1] = min(A[-1], max_a[N-1])

for i in reversed(range(N-1)):
    if cnt_list[i+1] + A[i+1] <= max_a[i]:
        cnt_list[i] = cnt_list[i+1] + A[i+1]
    else:
        cnt_list[i] = max_a[i]

cnt = sum(cnt_list[:N+1]) + sum(A)

print(cnt)
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N, K = mi()
A = li()
flag = [0]*N
l = []
i = 1
ind = 0
while True:
    #print(ind, flag)
    flag[ind] = i
    l.append(ind+1)
    if not flag[A[ind]-1]:
        ind = A[ind]-1
    else:
        ind = A[ind]-1
        break
    i += 1

if K < flag[ind] -1:
    print(l[K])
    exit()

if ind != 0:
    K -= flag[ind] -1
    i -= flag[ind] -1
    print(l[K%i+i-1])
else:
    print(l[K%i])

Fixed submission:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N, K = mi()
A = li()
flag = [0]*N
l = []
i = 1
ind = 0
while True:
    flag[ind] = i
    l.append(ind+1)
    if not flag[A[ind]-1]:
        ind = A[ind]-1
    else:
        ind = A[ind]-1
        break
    i += 1

if K <= flag[ind] - 1:
    print(l[K])
    exit()

if ind != 0:
    K -= flag[ind] -1
    i -= flag[ind] -1
    l = l[flag[ind] -1:]
print(l[K%i])
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))
import math

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return sorted(divisors)



X = ii()
'''
a = make_divisors(X)
ind = bisect.bisect_left(a, X**0.2)

for num in a[:ind+1]:
    for i in range(num):
        j = num - i
        if i**5 + j**5 == X:
            print(i, (-1)*j)
            exit()
'''
num = int(X**0.2)+1
for i in range(num):
    #tmp = i**5
    b = (X - i**5)**0.2
    if math.floor(b) == b:
        print(i, (-1)*int(b))
        exit()

Fixed submission:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

S = input()

if S == 'ABC':
    print('ARC')
else:
    print('ABC')
Buggy python submission (verdict: Runtime Error):
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N, M = mi()
 
l = [i for i in range(1, N+1)]
 
if N % 2:
    for i in range(M):
        print(N//2-i, N//2+i+1)
else:
    for i in range(M//2, M):
        print(1+i-M//2, N-i+M//2)
    for i in range(M//2):
        print(N//2-i, N//2+i+2)

Fixed submission:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N, M = mi()
 
l = [i for i in range(1, N+1)]
 
if N % 2:
    for i in range(M):
        print(N//2-i, N//2+i+1)
else:
    for i in range(M//2, M):
        print(1+i-M//2, N-i+M//2)
    for i in range(M//2):
        print(N//2-i, N//2+i+2)
Buggy python submission (verdict: Runtime Error):
import sys

S = input()

Q = int(input())
flag=0

for i in range(Q):
    r = sys.stdin.readline().strip('\n')
    if r == '1':
        S = S[::-1]
    else:
        ni, f, c = r.split()
        if f=='1':
            S = c + S
        else:
            S+=c

print(S)

Fixed submission:
N = input()

#A = map(int,input().split())

if N[0]==N[1]==N[2]:
    print('No')
    exit()
print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
import sys
 
S = input()
 
Q = int(input())
flag=0
 
for i in range(Q):
    r = sys.stdin.readline().strip('\n')
    if r == '1':
        S = S[::-1]
    else:
        ni, f, c = r.split()
        if f=='1':
            S = c + S
        else:
            S+=c
 
print(S)

Fixed submission:
import sys

S = input()

Q = int(input())
flag=0
mae = ''
matsu = ''

for i in range(Q):
    r = sys.stdin.readline().rstrip('\n')
    if r == '1':
        flag = 1 - flag
    else:
        ni, f, c = r.split()
        if f=='1':
            if flag == 0:
                mae += c
            else:
                matsu += c
        else:
            if flag == 0:
                matsu += c
            else:
                mae += c


if flag ==0:
    print(mae[::-1]+S+matsu)
else:
    print(matsu[::-1]+S[::-1]+mae)

Buggy python submission (verdict: Runtime Error):
for i in range(Q):
    r = sys.stdin.readline().strip('\n')
    if r == '1':
        S = S[::-1]
    else:
        ni, f, c = r.split()
        if f=='1':
            S = c + S
        else:
            S+=c

print(S)

Fixed submission:
import sys

S = input()

Q = int(input())
flag=0
mae = ''
matsu = ''

for i in range(Q):
    r = sys.stdin.readline().rstrip('\n')
    if r == '1':
        flag = 1 - flag
    else:
        ni, f, c = r.split()
        if f=='1':
            if flag == 0:
                mae += c
            else:
                matsu += c
        else:
            if flag == 0:
                matsu += c
            else:
                mae += c


if flag ==0:
    print(mae[::-1]+S+matsu)
else:
    print(matsu[::-1]+S[::-1]+mae)

Buggy python submission (verdict: Runtime Error):
import sys

S = input()

Q = int(input())
flag=0
mae = ''
matsu = ''
for i in range(Q):
    r = sys.stdin.readline().strip('\n')
    if r == '1':
        flag = 1- flag
    else:
        ni, f, c = r.split()
        if f=='1':
            if flag == 0:
                mae += c
            else:
                matsu += c
        else:
            if flag == 0:
                matsu += c
            else:
                mae += c
    if flag ==0:
        print(mae[::-1]+S+matsu)
    else:
        print(matsu[::-1]+S+mae)

Fixed submission:
import sys

S = input()

Q = int(input())
flag=0
mae = ''
matsu = ''

for i in range(Q):
    r = sys.stdin.readline().rstrip('\n')
    if r == '1':
        flag = 1 - flag
    else:
        ni, f, c = r.split()
        if f=='1':
            if flag == 0:
                mae += c
            else:
                matsu += c
        else:
            if flag == 0:
                matsu += c
            else:
                mae += c


if flag ==0:
    print(mae[::-1]+S+matsu)
else:
    print(matsu[::-1]+S[::-1]+mae)
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for _ in range(j)] for _ in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from itertools import accumulate #list(accumulate(A))

N, mod = mi()
S = list(map(int, list(input())))
ans = 0

if 10 % mod != 0:
    mod_list = [0]
    ten = 1
    for num in S[::-1]:
        yo = (num * ten + mod_list[-1]) % mod
        mod_list.append(yo)
        ten = (ten * 10) % mod

    cnt = [0]*2019
    for yo in mod_list:
        cnt[yo] += 1

    for i in range(2019):
        ans += cnt[i] * (cnt[i]-1) // 2

else:
    for i, num in enumerate(S):
        if num % mod == 0:
            ans += i+1

print(ans)

Fixed submission:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for _ in range(j)] for _ in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from itertools import accumulate #list(accumulate(A))

N, mod = mi()
S = list(map(int, list(input())))
ans = 0

if 10 % mod != 0:
    mod_list = [0]
    ten = 1
    for num in S[::-1]:
        yo = (num * ten + mod_list[-1]) % mod
        mod_list.append(yo)
        ten = (ten * 10) % mod

    cnt = [0]*mod
    for yo in mod_list:
        cnt[yo] += 1

    for i in range(mod):
        ans += cnt[i] * (cnt[i]-1) // 2

else:
    for i, num in enumerate(S):
        if num % mod == 0:
            ans += i+1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int,input().split())
P = list(map(float,input().split()))
anss=0        
for i in range(N-K+1):
    #print(i)
    ans_kari = sum([(P[i+j]+1.0)/2.0 for j in range(0,K)])
    #print(ans_kari)
    #print(i)
    if ans_kari > anss:
        anss = ans_kari

print(anss)

Fixed submission:
N, K = map(int,input().split())
P = list(map(float,input().split()))
for i in range(N):
    P[i] = (P[i]+1.0)/2.0

anss=0        
for i in range(N-K+1):
    #print(i)
    #ans_kari = sum(P[i:i+K])
    if i==0:
        ans_kari = sum(P[i:i+K])
    else:
        ans_kari = ans_kari - P[i-1] + P[i+K-1]
    #print(ans_kari)
    #print(i)
    if ans_kari > anss:
        anss = ans_kari

print(anss)
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N, K, S = mi()
A = [0]*N

if N == 1:
    print(S)
    exit()

if not S % 2:
    for i in range(K+1):
        A[i] = S//2
    for i in range(K+1, N):
        A[i] = S//2 + 1

else:
    for i in range(K+1):
        if i % 2:
            A[i] = S//2
        else:
            A[i] = S//2 + 1
    for i in range(K+1, N):
        A[i] = S//2 + 2

for i, num in enumerate(A):
    print(num, end="")
    if i != N-1:
        print(' ', end="")

Fixed submission:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N, K, S = mi()
A = [0]*N

if N == 1:
    print(S)
    exit()
if K==N:
    for i in range(N):
        print(S, end="")
        if i != N-1:
            print(' ', end="")
    exit()
if S == 1:
    for i in range(K):
        print(1, end="")
        if i != N-1:
            print(' ', end="")
    for i in range(K, N):
        print(2, end="")
        if i != N-1:
            print(' ', end="")
    exit()

mod = 10**9
if not S % 2:
    for i in range(K+1):
        A[i] = S//2
    for i in range(K+1, N):
            A[i] = (S + 1) % mod + 1
else:
    for i in range(K+1):
        if i % 2:
            A[i] = S//2
        else:
            A[i] = S//2 + 1
    for i in range(K+1, N):
        A[i] = (S + 1) % mod + 1

for i, num in enumerate(A):
    print(num, end="")
    if i != N-1:
        print(' ', end="")