Harryxun/stf_run huggingface dataset:
# -*- coding: utf-8 -*-
import numpy as np
inputs = input().split()
A = int(inputs[0])
B = int(inputs[1])
K = int(inputs[2])

candidates = np.arange(A, B + 1)
candidates = candidates[np.logical_or(candidates < A + K, candidates > B - K)]

for s in candidates:
    print(s)


### FIXED CODE ###

# -*- coding: utf-8 -*-
import numpy as np
inputs = input().split()
A = int(inputs[0])
B = int(inputs[1])
K = int(inputs[2])


if A + K < B - K:
    candidates = np.concatenate([np.arange(A, A + K), np.arange(B - K + 1, B + 1)])
else:
    candidates = np.arange(A, B + 1)
    candidates = candidates[np.logical_or(candidates < A + K, candidates > B - K)]

for s in candidates:
    print(s)
s = str(input())

if s=="Sunny":
    print ("Cloudy")
if s=="Cloudy":
    print ("Rainy")
if s=="Rainy":
    print ("Sunny")


### FIXED CODE ###

s = str(raw_input())

if s=="Sunny":
    print ("Cloudy")
if s=="Cloudy":
    print ("Rainy")
if s=="Rainy":
    print ("Sunny")
n = int(input())
lstp = list(map(int, input().split()))

count = 0
for i in range(1, len(lstp)-1):
    lst = list(lstp[i-1], lstp[i], lstp[i+1])
    if (min(lst) != lstp[i]) and (max(lst) != lstp[i]):
        count = count + 1

print(count)

### FIXED CODE ###

n = int(input())
lst = list(map(int, input().split()))

count = 0

for i in range(0, len(lst)-2):
    target = lst[i:i+3]
    minVal = min(target)
    maxVal = max(target)
    val = lst[i+1]
    if val != minVal and val != maxVal:
        count += 1

print(count)
x =[list(map(str,input().split())) for i in range(2)]
if x[0][0]==x[1][0] and x[0][1]==x[1][1] and x[0][2]==x[1][2]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

x =[str(input()) for i in range(2)]
if x[0][0]==x[1][2] and x[0][1]==x[1][1] and x[0][2]==x[1][0]:
  print("YES")
else:
  print("NO")
N,X = map(int,input().split())

L = [int(i) for i in range(N)]

D =[]
D[0]=0

for i in range(N):
  x += L[i]
  D.append(x)
  
  
print(D)

### FIXED CODE ###

N,X = map(int,input().split())

L = [int(i) for i in input().split()]

D =[]
D.append(0)
x = 0

for i in range(N):
  x += L[i]
  D.append(x)
  
ans = 0

for i in range(N+1):
  
  if D[i] <= X:
    ans += 1

print(ans)
A = list(input())
B = list(input())
C = list(input())
ans = 1
if len(A) == 1 and A[0] == 'a':
    print('A')
else:
    card = A[0]
    del A[0]
    while ans == 1:
        
        if card == 'a':
            
            card = A[0]
            del A[0]
            
            if card == 'a' and len(A) == 0:
                print('A')
                ans = 0
                
        elif card == 'b':
            
            card = B[0]
            del B[0]
            
            if card == 'b' and len(B) == 0:
                print('B')
                ans = 0
                
        elif card == 'c':
            
            card = C[0]
            del C[0]
            
            if card == 'c' and len(C) == 0:
                print('C')
                ans = 0


### FIXED CODE ###

SA = list(input())
SB = list(input())
SC = list(input())
turn = 'a'

for i in range(301):
    if turn == 'a':
        
        if len(SA) == 0:
            print('A')
            break
        
        else:
            turn = SA[0]
            del SA[0]
    
    if turn == 'b':
        
        if len(SB) == 0:
            print('B')
            break
        
        else:
            turn =SB[0]
            del SB[0]
        
    if turn == 'c':
        if len(SC) == 0:
            print('C')
            break
        else:
            turn = SC[0]
            del SC[0]
import sys
sys.setrecursionlimit(100000)

N, M = map(int, input().split())
a_list = [int(input()) for _ in range(M)]

mod = 1000000007
  
ans = 1
result = {0:1, 1:1}

def fib(x):
    if(result.get(x)):
        return result.get(x)
    
    if x == 0 or x == 1:
        return result[x]
    else:
        a = fib(x - 1)
        result[x-1] = a
        b = result.get(x-2)
        
        return a + b

x = 0

for a in a_list:
    if a == x:
        ans = 0
        break
    
    ans = (ans * fib((a-1)-x)) % mod
    x = a+1
else:
    ans = (ans * fib(N-x)) % mod

print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
a_list = [int(input()) for _ in range(M)]

mod = 1000000007

DP = [-1] * (N + 1) 
DP[0] = 1 
DP[1] = 1 

def fib(n):
    for i in range(2, n + 1):
        DP[i] = DP[i-1] + DP[i-2]
    
    return DP[n]

ans = 1
x = 0

for a in a_list:
    if a == x:
        ans = 0
        break
    
    ans = (ans * fib((a-1)-x)) % mod
    x = a+1
else:
    ans = (ans * fib(N-x)) % mod
    
print(ans)
n,m=map(int,input().split())
a=[]
for i in range(m):
  a.append(int(input()))
b=[0 for x in range(n+1)]
b[0]=1
for i in range(1,n+1):
  if i in a:
    b[i]=0
  else:
    b[i]+=b[i-1]
    if i>1:b[i]+=b[i-2]
print(b[n]%=(10**9+7))

### FIXED CODE ###

print(sum(sorted(list(map(int,input().split())))[:2]))
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

sum_A = [0]
for i,a in enumerate(A, 1):
    tmp = sum_A[i-1] + a
    if tmp <= K:
        sum_A.append(tmp)
        mark_A = i
    else:
        break
    
sum_B = [0]
for i,b in enumerate(B, 1):
    tmp = sum_B[i-1] + b
    if tmp <= K:
        sum_B.append(tmp)
        mark_B = i
    else:
        break
    
ans = 0
j = mark_B

for i,a in enumerate(sum_A):
    while sum_B[j] > K - a:
        j -= 1
        
    ans = max(ans, i+j)
    
print(ans)

### FIXED CODE ###

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

sum_A = [0]
for i,a in enumerate(A, 1):
    tmp = sum_A[i-1] + a
    if tmp <= K:
        sum_A.append(tmp)
        mark_A = i
    else:
        break
    
sum_B = [0]
for i,b in enumerate(B, 1):
    tmp = sum_B[i-1] + b
    if tmp <= K:
        sum_B.append(tmp)
        mark_B = i
    else:
        break
    
ans = 0
j = len(sum_B) - 1

for i,a in enumerate(sum_A):
    while sum_B[j] > K - a:
        j -= 1
        
    ans = max(ans, i+j)
    
print(ans)
m = map(int, raw_input().split())
c = 0
for i in range(m[0],[1]):
 if i % m[2] == 0 :
  c = c + 1
print c

### FIXED CODE ###

m = map(int, raw_input().split())
c = 0


for i in xrange(m[0],m[1]+1):
  if m[2] % i == 0:
   c = c + 1
print c
import numpy as np
import itertools

n, m, x = map(int, input().split())
calist = []
for i in range(n):
    ca = list(map(int, input().split()))
    calist.append(ca)

# print(n, m, x, calist)

# check
for j in range(m):
    sum = 0
    for i in range(n):
        sum += calist[i][j + 1]
    if sum < x:
        print(-1)
        exit()

calist = np.array(calist)
dp = float('inf')

for comb in range(1, m + 1):
    sc = itertools.combinations(calist, comb)
    sum = 0
    a = np.array([0 for _ in range(m)])
    for ca in sc:
        sum += ca[0]
        a += ca[1:]
    if False not in (a > x) and sum < dp:
        dp = sum

print(dp)


### FIXED CODE ###

import unittest
from io import StringIO
import sys


def resolve():
    n, m, x = [int(i) for i in input().split()]
    cc = []
    aa = []
    for comb in range(n):
        c, *a = [int(comb) for comb in input().split()]
        cc.append(c)
        aa.append(a)

    ans = float('inf')
    for comb in range(2**n):
        sum = 0
        xx = [0] * m
        for i in range(n):
            if (comb >> i) & 1:
                sum += cc[i]
                for j in range(m):
                    xx[j] += aa[i][j]
        for tx in xx:
            if tx < x:
                break
        else:
            ans = min(ans, sum)

    if ans == float('inf'):
        print(-1)
    else:
        print(ans)


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """3 3 10
60 2 2 4
70 8 7 9
50 2 3 9"""
        output = """120"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """3 3 10
100 3 1 4
100 1 5 9
100 2 6 5"""
        output = """-1"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """8 5 22
100 3 7 5 3 1
164 4 5 2 7 8
334 7 2 7 2 9
234 4 7 2 8 2
541 5 4 3 3 6
235 4 8 6 9 7
394 3 6 1 6 2
872 8 4 3 7 2"""
        output = """1067"""
        self.assertIO(input, output)


if __name__ == "__main__":
    # unittest.main()
    resolve()
# coding: utf-8
import math
N,M=map(int,input().split())

for i in range(1,int(math.sqrt(M))):
    if M%i==0:
        if M//i>=N:
            ans=i
            
print(ans)

### FIXED CODE ###

# coding: utf-8
import math
N,M=map(int,input().split())
A=[]
for i in range(1,int(math.sqrt(M))+1):
    if M%i==0:
        if M//i>=N:
            A.append(i)
            if i>=N and M//i>i:
                A.append(M//i)

A.sort()

ans=A[-1]

print(ans)
for i in range(1000)
    print "Hello World"

### FIXED CODE ###

for i in range(1000):
    print "Hello World"
n = input()

a,b = n[0], n[1]

if (a + b) % 2 === 0:
    print((a + b) // 2)
else:
    print("IMPOSSIBLE")

### FIXED CODE ###

a, b = map(int, input().split())

if (a + b) % 2 == 0:
    print((a + b) // 2)
else:
    print("IMPOSSIBLE")
#! /usr/bin/env python3

# from math import gcd
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement
import copy

N, M = [int(_) for _ in input().split()]
AB = [[int(_) for _ in input().split()] for i in range(M)]

goal = 1
rets = []
road = {i:[] for i in range(1, N+1)}

for A, B in AB:
    road[A] += [B]
    road[B] += [A]

ret, retind = [], []

def dfs(ind, inds, dis):

    global goal, ret, retind

    if ind in inds:
        return

    inds += [ind]
    dis += 1

    if ind == goal:
        ret += [dis]
        retind += [inds]
        return

    for i in road[ind]:
        dfs(i, copy.copy(inds), dis)

for start in range(2, N+1):
    ret, retind = [], []
    dfs(start, [], 0)
    if ret:
        rets += [retind[ret.index(min(ret))][1]]
    else:
        rets += [None]

ch = list(set(rets))
if len(ch) == 1 and ch[0] == None:
    print("No")
else:
    print("Yes")
    for i in rets:
        print(i)

### FIXED CODE ###

#! /usr/bin/env python3

# from math import gcd
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement
import copy

N, M = [int(_) for _ in input().split()]
AB = [[int(_) for _ in input().split()] for i in range(M)]

graph = [[] for i in range(N)]

for A, B in AB:
    graph[A-1] += [B]
    graph[B-1] += [A]

D = deque([0])
visited = [0] * N
visited[0] = 1

ret = [0 for i in range(N)]

while D:
    v = D.popleft()
    for i in graph[v]:
        i -= 1
        if visited[i]: continue
        visited[i] = 1
        ret[i] = v + 1
        D.append(i)

if any(ret[1:]):
    print("Yes")
    for i in ret[1:]:
        print(i)
else:
    print("No")
alist=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k=input()

print(alist[k-1])

### FIXED CODE ###

a=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k=int(input())

print(a[k-1])
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
    
def lcm(x, y):
    return (x * y) // math.gcd(x, y)


def main():
    a,b,c,d = LI()
    c_d_gcd = lcm(c,d)
    s = b//c + b//d - b//c_d_gcd
    t = (a-1) // c + (a-1) // d - (a-1) // c_d_gcd
    print(b - a + 1 - (s-t))
main()



### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque


from fractions import gcd

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
    
def lcm(x, y):
    return (x * y) // gcd(x, y)

def main():
    a,b,c,d = LI()
    c_d_gcd = lcm(c,d)
    s = b//c + b//d - b//c_d_gcd
    t = (a-1) // c + (a-1) // d - (a-1) // c_d_gcd
    print(b - a + 1 - (s-t))
main()
N,Q = map(int,input().split())
 
AB = [[int(x) for x in input().split()] for _ in range(N-1)] 
PX = [[int(x) for x in input().split()] for _ in range(Q)]

ki = [[]for _ in range(N+1)]
for a,b in AB:
    a-=1
    b-=1
    ki[a].append(b)
    ki[b].append(a)
point = [0]*(N+1)
for p,x in PX:
    p-=1
    point[p]+=x
def dfs(now, last ,add):
    point[now]+= add
    for x in ki[now]:
        if (x == last):continue
        dfs(x,now,point[now])
dfs(0,0,0)
print(*point)
    
    

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
N,Q = map(int,input().split())
 
AB = [[int(x) for x in input().split()] for _ in range(N-1)] 
PX = [[int(x) for x in input().split()] for _ in range(Q)]

ki = [[]for _ in range(N)]
for a,b in AB:
    a-=1
    b-=1
    ki[a].append(b)
    ki[b].append(a)
point = [0]*(N)
for p,x in PX:
    p-=1
    point[p]+=x
def dfs(now, last ,add):
    point[now]+= add
    for x in ki[now]:
        if (x == last):continue
        dfs(x,now,point[now])
dfs(0,0,0)
print(*point)
a,b,c,d=map(int,input().split())
print("Yes" (b-a<=d and c-b<=d) or c-a<=d else "No" )

### FIXED CODE ###

a,b,c,d=map(int,input().split())
print("Yes" if (abs(b-a)<=d and abs(c-b)<=d) or abs(c-a)<=d else "No" )
import sys
sys.setrecursionlimit(20000)

def dfs(i,x):
    ans[i]+=x
    if dist[i]==bottom:
        return
    for n in tree[i]:
        if dist[n]>dist[i]:
            dfs(n,x)

from collections import deque

N,Q=map(int,input().split())

tree=[[] for _ in range(N)]

for _ in range(N-1):
    A,B=map(int,input().split())
    tree[A-1].append(B-1)
    tree[B-1].append(A-1)

#BFSで各ノードの深さを調べる
dist = [-1]*N
que = deque([0])
dist[0] = 0
while que:
    v = que.popleft()
    d = dist[v]
    for w in tree[v]:
        if dist[w] > -1:
            continue
        dist[w] = d + 1
        que.append(w)

#カウンターをDFSで制御
ans=[0 for _ in range(N)]
bottom=max(dist)
for j in range(Q):
    p,x=map(int,input().split())
    dfs(p-1,x)

print(*ans)

### FIXED CODE ###

from collections import deque

N,Q=map(int,input().split())

tree=[[] for _ in range(N)]

for _ in range(N-1):
    A,B=map(int,input().split())
    tree[A-1].append(B-1)
    tree[B-1].append(A-1)

ans=[0 for _ in range(N)]
for j in range(Q):
    p,x=map(int,input().split())
    ans[p-1]+=x

#BFSで親のカウンターを子に継がせる
dist = [-1]*N
que = deque([0])
dist[0] = 0
while que:
    v = que.popleft()
    d = dist[v]
    for w in tree[v]:
        if dist[w] > -1:
            continue
        que.append(w)
        dist[w]=d+1
        ans[w]+=ans[v]

print(*ans)
N = int(input())
for i in range(N):
  if int(input)() % 2:
    print('first')
    break
else:
  print('second')

### FIXED CODE ###

N = int(input())
for i in range(N):
  if int(input()) % 2:
    print('first')
    break
else:
  print('second')
# -*- coding: utf-8 -*-
import math
def main():
# 整数の入力
    x = int(input())
    a = 0
    b = 0
    while True:
        y = 0
        y5_x = math.pow(b, 5)
        y = math.pow(y5_x - x, -5)
        
        y = int(y)
        if math.pow(y, 5) + x == y5_x:
            a = y
            break
        else:
            b += 1

    print(f"{b} {a}")

if __name__ == '__main__':
    main()

### FIXED CODE ###

# -*- coding: utf-8 -*-

def main():
# 整数の入力
    
    s = input()
    # 出力
    if s == "ABC":
        print("ARC")
    if s == "ARC":
        print("ABC")

if __name__ == '__main__':
    main()
while 1:
  x,y = map( int , raw_input().split() )
  if x == 0 and y == 0
    break
  elif x < y
    print "%d %d" %(x,y) 
  elif y < x  
    print "%d %d" %(y,x) 

### FIXED CODE ###

while 1:
  x,y = map( int , raw_input().split() )
  if x == 0 and y == 0:
    break
  elif x <= y:
    print "%d %d" %(x,y) 
  elif y < x : 
    print "%d %d" %(y,x)
def opeCounter(S, K):
    T = S * K
    c = 0
    i = 1
    while i < len(T):
        if T[i-1] == T[i]:
            c += 1
            i += 1
        i += 1
    return c

def agc039a(S, K):
    s1 = opeCounter(S, 1)
    s2 = opeCounter(S, 2)
    s3 = opeCounter(S, 3)
    d1 = s2 - s1
    d2 = s3 - s2

    ans = 0
    if d1 == d2: ans = s1 + d1 * (K-1)
    else:
        if(k%2 != 0): ans = s1 + (d1+d2) * ((k+2-1)//2-1) ##(k/2):roundup
        else: ans = s2 + (d1+d2) * (k//2-1)
    return ans

S = input()
K = int(input())
print(agc039a(S, K))

### FIXED CODE ###

def opeCounter(S, K):
    T = S * K
    c = 0
    i = 1
    while i < len(T):
        if T[i-1] == T[i]:
            c += 1
            i += 1
        i += 1
    return c

def agc039a(S, K):
    s1 = opeCounter(S, 1)
    s2 = opeCounter(S, 2)
    s3 = opeCounter(S, 3)
    d1 = s2 - s1
    d2 = s3 - s2

    ans = 0
    if d1 == d2: ans = s1 + d1 * (K-1)
    else:
        if(K%2 != 0): ans = s1 + (d1+d2) * ((K+2-1)//2-1) ##(k/2):roundup
        else: ans = s2 + (d1+d2) * (K//2-1)
    return ans

S = input()
K = int(input())
print(agc039a(S, K))
import sys
w,h,x,y=map(int,input().split())
#l=[int(i) for i in input().split()]
a=[y*w,(h-y)*w]
a.sort()
b=[x*h,(w-x)*h]
b.sort()
d=[a[0],b[0]]
d.sort()
#print(a,b,d)
#0,0 x,y 
if abs((h/w)-(y/x)) < sys.float_info.epsilon:
    print((w*h)/2,0)
elif x!=w and abs((h/w)-y/(x-w))< sys.float_info.epsilon:
    print((w*h)/2,0)
elif (x==0 and y==0) or (x==w and y==h) or (x==0 and y==h) or (x==w and y==0):
    print((w*h)/2,0)
elif d[0]==d[1]:
    print(d[1],1)
else:
    print(d[1],0)


### FIXED CODE ###

w,h,x,y=map(int,input().split())
s=(w*h)/2
if (h//2==y and h%2==0) and (w//2==x and w%x==0):
    print(s,1)
else:
    print(s,0)
s_=input()
t=input()

p=re.compile(s_.replace("?","."))
t_s=len(s_)-len(t)
t_e=t_s+len(t)
for t_s in range(t_s,-1,-1):
    s=s_[:t_s]+t+s_[t_e:]
    if(p.match(s)):
        s=s.replace("?","a")
        print(s)
        break
else:
    print("UNRESTORABLE")

### FIXED CODE ###

s_=input()
t=input()
 
filled_idx=[i for i in range(len(s_)) if s_[i]!="?"]
 
for t_s in range(len(s_)-len(t),-1,-1):
    t_e=t_s+len(t)
    s=s_[:t_s]+t+s_[t_e:]
    if(all(s[i]==s_[i] for i in filled_idx)):
        s=s.replace("?","a")
        print(s)
        break
else:
    print("UNRESTORABLE")
a,b=map(int,input().split())
if a-b＊2<0:
  
  print(0)
else:
  print(a-b＊2)
  


### FIXED CODE ###

a,b=map(int,input().split())
if a-b*2<=0:
  
  print(0)
else:
  print(a-b*2)
import heapq
l = [1, 2, 3, 4, 5, 6, 7, 8, 9]
heapq.heapify(l)

def f(x):
    # xの最後の数値だけ取り出す
    min_x = int(list(str(x))[-1])
    if min_x == 0:
        yield int(x + "0")
        yield int(x + "1")
    elif min_x == 9:
        yield int(x + "8")
        yield int(x + "9")
    else:
        yield int(x + str(min_x - 1))
        yield int(x + str(min_x))
        yield int(x + str(min_x + 1))

K = int(input())
ans = 1
for i in range(K):
    if i == K - 1:
        ans = heapq.heappop(l)
        break
    for y in f(heapq.heappop(l)):
        heapq.push(l, y)
print(ans)

### FIXED CODE ###

l = [1, 2, 3, 4, 5, 6, 7, 8, 9]
l_temp = [1, 2, 3, 4, 5, 6, 7, 8, 9]

def f(x):
    temp = list(str(x))
    t = int(temp[-1])
    if t == 0:
        return int(str(x) + str(t)), int(str(x) + str(t + 1))
    elif t == 9:
        return int(str(x) + str(t - 1)), int(str(x) + str(t))
    else:
        return int(str(x) + str(t - 1)), int(str(x) + str(t)), int(str(x) + str(t + 1))
       

while len(l) < 10 ** 5:
    temp = []
    for l_t in l_temp:
        tem = list(f(l_t))
        for t in tem:
            temp.append(t)
    for t in temp:
        l.append(t)
    l_temp = temp

K = int(input())
print(l[K-1])
import math
a, b = int(input().split(" "))
c = (a + b)/2 # 平均値
if (a+b) % 2 != 0: # 余りが０以外の時小数点以下をきりあげる必要がある。
  print(math.ceil(c))
else:
  print(c)


### FIXED CODE ###

a, b = map(int, input().split())
print((a + b + 1) // 2)
import numpy as np
from functools import reduce

def dist(array,xyh):
    return abs(array.real-xyh[0])+abs(array.imag-xyh[1])+xyh[2]

N=int(input())
xyh=np.array([list(map(int,input().split())) for _ in range(N)])

a=np.arange(101)+np.arange(101).reshape(101,1)*1j
dxyh=dist(a,xyh[0])

ans=np.where(reduce(lambda a,b:a&b,[dist(a,xyh[i])==dxyh for i in range(1,N)]) == True)
print(ans[1][0],ans[0][0],int(dxyh[ans[0][0],ans[1][0]]))

### FIXED CODE ###

import numpy as np
from functools import reduce

def dist(array,xyh):
    return (abs(array.real-xyh[0])+abs(array.imag-xyh[1])+xyh[2])

def dist2(array,xyh,dxyh):
    if xyh[2]>0:
        return dist(array,xyh) == dxyh
    else:
        return dist(array,xyh) >= dxyh

N=int(input())
xyh=sorted([list(map(int,input().split())) for _ in range(N)],key=lambda x:x[2],reverse=True)

a=np.arange(101)+np.arange(101).reshape(101,1)*1j
dxyh=dist(a,xyh[0])

ans=np.where(reduce(lambda a,b:a&b,[dist2(a,xyh[i],dxyh) for i in range(1,N)]) == True)
print(ans[1][0],ans[0][0],int(dxyh[ans[0][0],ans[1][0]]))
import numpy as np

n, k = map(int, input().split())
ai = list(map(int, input().split()))

ei = []

for i in range(k,n+1):
    ei.append(np.prod(ai[i-k:i]))


for i in range(n-k):
    if ei[i] < ei[i+1]:
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

kyu = [400,600,800,1000,1200,1400,1600,1800,2000]

x = int(input())

for i, v in enumerate(kyu):
    if x < v:
        print(9-i)
        break
def main():
  N, K = map(int, input().split(' '))
  # N本の木があって，i本目の木はh_i[m]
  # K本選んで電飾する.
  # 木の内一番高いのをh_max[m], 低いものをh_min[m]
  # min(h_max - h_min)をしたい.
  trees = [int(input()) for _ in range(N)]
  trees.sort()
  trees = [n - trees[0] for n in trees]
  # print(trees[K-1] - trees[0]) -> これだと，最初の方はかなり分散が大きい配列で，後ろの方が分散が小さい配列だとダメ
  # 例[0, 100, 101, 102] から2個選ぶ時, 上記だと100が帰ってくる.
  MIN = 100000000000000
  # print(trees)
  for n in range(K):
    t = trees[n+K-1] - trees[n]
    MIN = min(t, MIN)
  print(MIN)
main()

### FIXED CODE ###

def main():
  N, K = map(int, input().split(' '))
  # N本の木があって，i本目の木はh_i[m]
  # K本選んで電飾する.
  # 木の内一番高いのをh_max[m], 低いものをh_min[m]
  # min(h_max - h_min)をしたい.
  trees = [int(input()) for _ in range(N)]
  trees.sort()
  trees = [n - trees[0] for n in trees]
  # print(trees[K-1] - trees[0]) -> これだと，最初の方はかなり分散が大きい配列で，後ろの方が分散が小さい配列だとダメ
  # 例[0, 100, 101, 102] から2個選ぶ時, 上記だと100が帰ってくる.
  # MIN = 100000000000000
  # print(trees)
  # for n in range(K):
  # for n in range(N - K + 1):
  #   t = trees[n+K-1] - trees[n]
  #   MIN = min(t, MIN)
  MIN = min([trees[n+K-1] - trees[n] for n in range(N-K+1)])
  print(MIN)

main()