Harryxun/stf_run huggingface dataset:
while 1:
	n, k, s = map(int,raw_input().split())
	if (n, k, s) == (0, 0, 0):
		break
	dp = [[0 for i in range(s)] for j in range(k)]
	for x in range(1,n+1):
		for j in range(k-1):
			for i in range(s-x):
				if dp[j+1][i] >= 1:
					dp[j][i+x] += dp[j+1][i]
		dp[k-1][x-1] = 1
	print dp[0][s-1]

### FIXED CODE ###

while 1:
	n, k, s = map(int,raw_input().split())
	if (n, k, s) == (0, 0, 0):
		break
	dp = [[0 for i in range(s)] for j in range(k)]
	ub = min(n+1,s+1)
	for x in range(1,ub):
		for j in range(k-1):
			for i in range(s-x):
				if dp[j+1][i] >= 1:
					dp[j][i+x] += dp[j+1][i]
		dp[k-1][x-1] = 1
	print dp[0][s-1]
s = input()

if s[0] == s[1] && s[1] == s[2] && s[0] == s[2]:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

s = input()
a, b, c = 0, 0, 0

for i in s:
    if i == "a" and a == 0:
        a += 1
    elif i == "b" and b == 0:
        b += 1
    elif i == "c" and c == 0:
        c += 1
    else:
        print("No")
        break
else:
    print("Yes")
n = int(input())

a = [0] * 10010

# x = y = z
x = 1
while True:
  a[6 * x * x] += 1
  x += 1
  if 6 * x * x > n:
    break

# x = y, z
for x in range(1, n+1):
  for z in range(1, n+1):
    if x == z:
      continue
    a[3 * x * x + z * z + 2 * x * z] += 1
    if 3 * x*x + z*z + 2*x*z > n:
      break
  if x * x > n:
    break

# x,y,z
for x in range(1, n+1):
  for y in range(x+1, n+1):
    for z in range(y+1, n+1):
      a[x*x + y*y + z*z + x*y + y*z + z*x] += 1
      if x*x + y*y + z*z + x*y + y*z + z*x > n:
        break
    if x*x + y*y + x*y > n:
      break
  if x*x > n:
    break

for i in range(n):
  print(a[i])



### FIXED CODE ###

n = int(input())

a = [0] * 10010

# x,y,z
for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1, 101):
      if x*x + y*y + z*z + x*y + y*z + z*x > n:
        continue
      a[x*x + y*y + z*z + x*y + y*z + z*x] += 1


for i in range(1, n+1):
  print(a[i])
import math
from functools import reduce

c, d = (int(i) for i in input().split())  
a = [int(i) for i in input().split()]
b = a.copy()

k = 0
for i in a:
    b[k] = abs(i - d)
    k += 1

m = min(b) 

lo = []

def gcd_list(numbers):
    return reduce(math.gcd, numbers)


                
print(gcd_list(b))

### FIXED CODE ###

a, b = (int(i) for i in input().split())

if a%2 ==0 or b%2 ==0: 
    print("No") 
else: 
    print("Yes")
n = int(input())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().solit()]
ans = a[0]+sub(b)
sub = ans
for i in range(1, n):
  sub += a[i]
  sub -= b[i-1]
  if ans < sub:
    ans = sub
print(ans)

### FIXED CODE ###

def main():
    n = int(input())
    a = [int(x) for x in input().split()]
    b = [int(x) for x in input().split()]
    ans = a[0]+sum(b)
    sub = ans
    for i in range(1, n):
        sub += a[i]
        sub -= b[i-1]
        if ans < sub:
            ans = sub
    print(ans)

if __name__ == "__main__":
    main()
s = input()

if len(list(set(s))) >= 3:
  print("No")
else:
  s = list(set(s))
  if count(s[0]) == count(s[1]):
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

s = input()
s_s = list(set(s))

if len(s_s) == 2:
  if s.count(s_s[0]) == s.count(s_s[1]):
    print("Yes")
else:
    print('No')
N = int(input())
l = list(map(int,input().split()))

for T in range(N-1):
    S1 = 0
    S2 = 0
    for i in range(T+1):
        S1 += l[i]
    for i in range(T+1,N):
        S2 += l[i]
    if T == 0:
        min = abs(S1-S2)
    else if abs(S1-S2) < min:
        min = abs(S1-S2)

print(min)


### FIXED CODE ###

N = int(input())
l = list(map(int,input().split()))

for T in range(N-1):
    S1 = 0
    S2 = 0
    for i in range(T+1):
        S1 += l[i]
    for i in range(T+1,N):
        S2 += l[i]
    if T == 0:
        min = abs(S1-S2)
    elif abs(S1-S2) < min:
        min = abs(S1-S2)

print(min)
n , m = map(int , input().split())
A = list(map(int , input().split()))
B_C = []
b_sum = 0
for i in range(m):
    b , c = map(int , input().split())
    B_C.append([b , c])
    b_sum += b
A.sort()
B_C.sort(key = lambda(x) : -x[1])
k = 0
for b , c in B_C:
    for i in range(k , k + b):
        if i = len(A):
            break
        A[i] = max(A[i] , c)
        k += b
print(sum(A))

### FIXED CODE ###

n, m = map(int, input().split())
A = sorted(list(map(int, input().split())))

bc = []
for i in range(m):
    b, c = map(int, input().split())
    bc.append([b,c])

from operator import itemgetter
bc.sort(key=itemgetter(1), reverse = True)
k = 0
c = bc[0][1]
b = bc[0][0]
bn = 0
while A[k] < c:
    A[k]=c
    k+=1
    if k == len(A):
        break
    b-=1
    if b  == 0:
        bn += 1
        if bn == len(bc):
            break
        b = bc[bn][0]
        c = bc[bn][1]
print(sum(A))
N, M, K = map(int, input().split())
MOD = 10 ** 9 + 7

P = 100005
fact = [0] * P
fact[0] = 1
for i in range(1, P):
    fact[i] = fact[i - 1] * i
    fact[i] %= MOD

rfact = [0] * P
rfact[P - 1] = pow(fact[P - 1], MOD - 2, MOD)
for i in range(P - 2, -1, -1):
    rfact[i] = rfact[i + 1] * (i + 1)
    rfact[i] %= MOD


def comb(n, k):
    return fact[n] * rfact[k] * rfact[n - k] % MOD


num = 0
for d in range(1, N):
    num += d * (N - d) * (M ** 2)
    num %= MOD

for d in range(1, M):
    num += d * (M - d) * (N ** 2)
    num %= MOD

num *= comb(N * M - 2, K - 2)
print(num % MOD)



### FIXED CODE ###

N, M, K = map(int, input().split())
MOD = 10 ** 9 + 7

P = 200005
fact = [0] * P
fact[0] = 1
for i in range(1, P):
    fact[i] = fact[i - 1] * i
    fact[i] %= MOD

rfact = [0] * P
rfact[P - 1] = pow(fact[P - 1], MOD - 2, MOD)
for i in range(P - 2, -1, -1):
    rfact[i] = rfact[i + 1] * (i + 1)
    rfact[i] %= MOD


def comb(n, k):
    return fact[n] * rfact[k] * rfact[n - k] % MOD


num = 0
for d in range(1, N):
    num += d * (N - d) * (M ** 2)
    num %= MOD

for d in range(1, M):
    num += d * (M - d) * (N ** 2)
    num %= MOD

num *= comb(N * M - 2, K - 2)
print(num % MOD)
import math
a, b, x = map(int, input().split())
i = a**3
j = 2*(a*a*b-x)
tan1 = i/j
deg = math.degrees(math.atan(tan1))
if deg < 45:
    tan2 = 2*x / (a*b*b)
    deg = math.degrees(math.atan(tan2))

print(90-deg)

### FIXED CODE ###

import math
a, b, x = map(int, input().split())

if x < a*a*b/2:
    tan = 2*x / (a*b*b)
    deg = math.degrees(math.atan(tan))
    print(90-deg)
elif x == a*a*b:
    print(0)
else:
    i = a**3
    j = 2*(a*a*b-x)
    tan = i/j
    deg = math.degrees(math.atan(tan))
    print(90-deg)
def f(s, v, k):
    if k == 0:
        return sum(s)
    v1 = v[::]
    s1 = s[::]
    v2 = v[::]
    s2 = s[::]
    v3 = v[::]
    s3 = s[::]
    s3.append(v3.pop(0))
    v4 = v[::]
    s4 = s[::]
    s4.append(v4.pop(-1))
    a = -1 * (10 ** 7)
    b = -1 * (10 ** 7)
    if len(s) > 0:
        ms = min(s)
        v1.insert(0, ms)
        s1.pop(s1.index(ms))
        v2.append(ms)
        s2.pop(s2.index(ms))
        a = f(s1, v1, k - 1)
        b = f(s2, v2, k - 1)
    c = f(s3, v3, k - 1)
    d = f(s4, v4, k - 1)
    return max(a, b, c, d)


def main():
    N, K = map(int, input().split())
    V = list(map(int, input().split()))
    ans = max(f([V[0]], V[1:], K - 1), f([V[-1]], V[:-1], K - 1))
    if ans > 0:
        print(ans)
    else:
        print(0)


main()


### FIXED CODE ###

def main():
    N, K = map(int, input().split())
    V = list(map(int, input().split()))
    ans = 0
    for l in range(K + 1):
        for r in range(K - l + 1):
            if l + r > N:
                continue
            d = K - l - r
            s = V[:l] + V[N - r:N]
            now = 0
            now += sum(s)
            s.sort()
            for i in range(d):
                if i >= len(s):
                    break
                if s[i] > 0:
                    break
                now -= s[i]
            ans = max(ans, now)
    print(ans)


main()
a = list(map(int, input().split()))
p = list(map(int, input().split()))

N = a[0]
K = a[1]

p = p.sort

g = sum(p[0:K-1])
print(g)

### FIXED CODE ###

a = list(map(int, input().split()))
p = list(map(int, input().split()))

N = a[0]
K = a[1]

p.sort()

g = 0
for k in range(K):
	g = g + p[k]
print(g)
from random import randint
from numba.np.ufunc import parallel
import numpy as np
from numba import njit


@njit('i4(i4,i4,i4,i4[:,:])',cache=True)
def f(h,w,m,ins):
    yp = np.zeros(h,dtype=np.int32)
    xp = np.zeros(w,dtype=np.int32)
    ans = 0
    s = set()
    for hi,wi in ins:
        s.add((hi-1,wi-1))
        yp[hi-1] += 1
        xp[wi-1] += 1
    ypm = yp[yp.argmax()]
    xpm = xp[xp.argmax()]
    yps = np.where(yp == ypm)[0]
    xps = np.where(xp == xpm)[0]
    ans = yp[yps[0]]+xp[xps[0]]
    for ypsi in yps:
        for xpsi in xps:
            if not ((ypsi,xpsi) in s):
                return ans
    return ans-1


if False:
    while True:
        h,w = randint(10**5,10**5*3),randint(10**5,10**5*3)
        m = randint(h*w,10**5*3)
        ins = [(randint(1,h),randint(1,w)) for i in range(m)]
        ans = f(h,w,m,np.array(ins,dtype=np.int32))
        print(ans)
else:
    h,w,m = map(int,input().split())
    ans = f(h,w,m,np.array([tuple(map(int,input().split())) for i in range(m)]))
    print(ans)


### FIXED CODE ###

from random import randint
import numpy as np
from numba import njit


#@njit
def f(h,w,m,ins):
    yp = np.zeros((h,2),dtype=np.int)
    xp = np.zeros((w,2),dtype=np.int)
    yp[:,1] = np.arange(h)
    xp[:,1] = np.arange(w)
    ans = 0
    s = set()
    for hi,wi in ins:
        s.add((hi-1,wi-1))
        yp[hi-1,0] += 1
        xp[wi-1,0] += 1
    ypm = yp[:,0].max()
    xpm = xp[:,0].max()
    yps = yp[yp[:,0] == ypm][:,1]
    xps = xp[xp[:,0] == xpm][:,1]
    #y = yp[yps]
    for ypsi in yps:
        for xpsi in xps:
            a = yp[ypsi,0]+xp[xpsi,0]
            if (ypsi,xpsi) in s:
                a -= 1
                ans = max(ans,a)
            else:
                return a
    return ans


if False:
    while True:
        h,w = randint(1,10**5*3),randint(1,10**5*3)
        m = randint(1,min(h*w,10**5*3))
        ins = [(randint(1,h),randint(1,w)) for i in range(m)]
        ans1 = f1(h,w,m,ins)
        ans2 = f2(h,w,m,ins)
        if ans1 != ans2:
            print("!!!!")
            print(h,w,m)
            print(ins)
else:
    h,w,m = map(int,input().split())
    ans = f(h,w,m,[tuple(map(int,input().split())) for i in range(m)])
    print(ans)
a,b,c=map(int,input().split())

if c>=a andc<=b:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

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

if c>=a and c<=b:
  print("Yes")
else:
  print("No")
num = int(input)
count = {"AC":0, "WA":0, "TLE":0, "RE":0}

for i in range(num):
  word = input()
  for (key , n) in count.items():
    if word == key:
      n += 1
 
for (key , n) in count.items():
  print(key + " × " + str(n))

### FIXED CODE ###

num = int(input())
count = {"AC":0, "WA":0, "TLE":0, "RE":0}
 
for i in range(num):
  word = input()
  for (key , n) in count.items():
    if word == key:
      count[key] += 1
 
for (key , n) in count.items():
  print(key + " x " + str(n))
N = int(input())
S = list(input())
ans = S.count('R')*S.count('G')*S.count('B') 
 #1番目の条件を満たすものの総数は(Rの個数)*(Gの個数)*(Bの個数)
for i in range(N): #判定を簡単にするためR:=1,G:=2,B:=4と置き換える
   if S[i]=='R':
       S[i]=1
   elif S[i]=='G':
       S[i]
   elif S[i]=='B':
       S[i]=4
for i in range(N): 
 #すべての(i,j)について(i,j,2*j-i)が1番目の条件を満たし、かつ2番目の条件を満たさないかを判定する
   for j in range(i+1,N):
     k=2*j-i
     if k>N : 
       continue  #考えなくて良いものはスキップ
     if S[i]+S[j]+S[k]==7 : 
         ans-=1   #1番目の条件を満たし、かつ2番目の条件を満たさないので、1を引く
print(ans)

### FIXED CODE ###

N = int(input())
S = list(input())
ans = S.count('R')*S.count('G')*S.count('B') 
for i in range(N): 
   if S[i]=='R':
       S[i] =1
   elif S[i]=='G':
       S[i] =2
   elif S[i]=='B':
       S[i] =4
for i in range(N): 
   for j in range(i+1,N):
     k=2*j-i
     if k>=N : 
       continue  
     if S[i]+S[j]+S[k]==7 : 
         ans-=1 
print(ans)
s = input()

s_no_x = ""
for i in range(len(s)):
    if s[i] != "x":
        s_no_x += s[i]

if s_no_x != s_no_x[::-1]:
    print(-1)
    exit()

if len(s_no_x) % 2 == 0:
    non_x_count = 0
    for i in range(len(s)):
        if s[i] != "x":
            non_x_count += 1
        if non_x_count == len(s_no_x)//2:
            s1 = s[:i]
        if non_x_count == len(s_no_x)//2 + 1:
            s2 = s[i+1:]
            break
else:
    non_x_count = 0
    for i in range(len(s)):
        if s[i] != "x":
            non_x_count += 1
        if non_x_count == len(s_no_x)//2 + 1:
            s1 = s[:i]
            s2 = s[i+1:]
            break

ans = abs(len(s1) - len(s2))
for i in range(min(len(s1), len(s2))):
    if s[i] != s[-i-1]:
        ans += 1

print(ans)

### FIXED CODE ###

s = input()

l = 0
r = len(s)-1
ans = 0

while l < r:
    if s[l] != s[r]:
        if s[l] == "x":
            ans += 1
            l += 1
        elif s[r] == "x":
            ans += 1
            r -= 1
        else:
            print(-1)
            exit()
    else:
        l += 1
        r -= 1

print(ans)
n=int(input())
if n%3==0:
    for i in range(n//3):
        print("a.."*n//3)
        print("a.."*n//3)
        print(".aa"*n//3)
else:
    if n%2==0 and n>=4:
        x="aacd"+"."*(n-4)
        y="bbcd"+"."*(n-4)
        for i in range(n//2):
            print(x)
            print(y)
            x=x[2:]+x[:2]
            y=y[2:]+y[:2]
    else:
        print(-1)

### FIXED CODE ###

n=int(input())
if n%3==0:
    for i in range(n//3):
        print("a.."*(n//3))
        print("a.."*(n//3))
        print(".aa"*(n//3))
elif n%2==0 and n>=4:
    x="aacd"+"."*(n-4)
    y="bbcd"+"."*(n-4)
    for i in range(n//2):
        print(x)
        print(y)
        x=x[2:]+x[:2]
        y=y[2:]+y[:2]
elif n>=13:
    x="aacd"+"."*(n-13)
    y="bbcd"+"."*(n-13)
    for i in range((n-9)//2):
        print(x+"."*9)
        print(y+"."*9)
        x=x[2:]+x[:2]
        y=y[2:]+y[:2]
    for i in range(3):
        print("."*(n-9)+"a..a..a..")
        print("."*(n-9)+"a..a..a..")
        print("."*(n-9)+".aa.aa.aa")   
elif n==5:
    print("aabba")
    print("bc..a")
    print("bc..b")
    print("a.ddb")
    print("abbaa")
elif n==7:
    print("aabbcc.")
    print("dd.dd.a")
    print("..e..ea")
    print("..e..eb")
    print("dd.dd.b")
    print("..e..ec")
    print("..e..ec")
elif n==11:
    print("aabbcc.....")
    print("dd.dd.a....")
    print("..e..ea....")
    print("..e..eb....")
    print("dd.dd.b....")
    print("..e..ec....")
    print("..e..ec....")
    print(".......aacd")
    print(".......bbcd")
    print(".......cdaa")
    print(".......cdbb")
else:
    print(-1)
n = int(input())
a = [int(x) for x in input().split()]
count = 0
judge = False

#奇数
odd = []
#偶数
even = []

# 奇数と偶数に分ける
for i_a in range(len(a)):
    if(a[i_a] % 2 == 0):
        even.append(a[i_a])
    else:
        odd.append(a[i_a])
# もし偶数がいない場合は操作不可能
if(even == []):
    print(0)
    exit()

# 偶数を一つ取り出し、2で割る。次で割れなくなるなら削除
max_odd = max(odd)
while True:
    count += 1
    even[0] /= 2
    if(even[0] % 2 != 0):
        even.pop(0)
    if(even == []):
        break
        

print(count)


# while True:
#     for i_a in range(len(a)):
#         judge = False
#         if(a[i_a] % 2 == 0):
#             a[i_a] /= 2
#             count += 1
#             judge = True
#             break
#         else:
#             a[i_a] *= 3
        
#     if(not judge):
#         print(count)
#         print(a)
#         exit()


# while True:
#     for i_a in range(len(a)):
#         judge = False
#         if(a[i_a] % 2 == 0):
#             a[i_a] /= 2
#             judge = True
#             break
#         else:
#             a[i_a] *= 3
        
#     if(not judge):
#         print(count)
#         exit()
#     else:
#         count += 1

### FIXED CODE ###

n = int(input())
a = [int(x) for x in input().split()]
count = 0
judge = False

#奇数
odd = []
#偶数
even = []

# 奇数と偶数に分ける
for i_a in range(len(a)):
    if(a[i_a] % 2 == 0):
        even.append(a[i_a])
    else:
        odd.append(a[i_a])
# もし偶数がいない場合は操作不可能
if(even == []):
    print(0)
    exit()

# 偶数を一つ取り出し、2で割る。次で割れなくなるなら削除
while True:
    count += 1
    even[0] /= 2
    if(even[0] % 2 != 0):
        even.pop(0)
    if(even == []):
        break
        

print(count)


# while True:
#     for i_a in range(len(a)):
#         judge = False
#         if(a[i_a] % 2 == 0):
#             a[i_a] /= 2
#             count += 1
#             judge = True
#             break
#         else:
#             a[i_a] *= 3
        
#     if(not judge):
#         print(count)
#         print(a)
#         exit()


# while True:
#     for i_a in range(len(a)):
#         judge = False
#         if(a[i_a] % 2 == 0):
#             a[i_a] /= 2
#             judge = True
#             break
#         else:
#             a[i_a] *= 3
        
#     if(not judge):
#         print(count)
#         exit()
#     else:
#         count += 1
from sys import stdin
from itertools import repeat
def main():
    n, m = map(int, stdin.readline().split())
    q = int(stdin.readline())
    a = map(int, stdin.readline().split(), repeat(10, q))
    a = [x - 1 for x in a]
    l = [[] for i in xrange(q)]
    la = []
    for i in xrange(q - 1, -1, -1):
        x = a[i]
        if not l[x]:
            la.append(x)
        l[x].append(i)
    ok = 1
    b = [q] * n
    f = [0] * m
    xt = 0
    for i, x in enumerate(la):
        j = 0
        for y in l[x]:
            if j < n and y < b[j]:
                b[j] = y
                j += 1
        if j < n:
            ok = 0
            b[j] = -1
        if not ok:
            while f[xt]:
                  xt += 1
            if x != xt:
                print "No"
                return
            f[xt] = 1
        else:
            f[x] = 1
    print "Yes"
main()

### FIXED CODE ###

from sys import stdin
from itertools import repeat
def main():
    n, m = map(int, stdin.readline().split())
    q = int(stdin.readline())
    a = map(int, stdin.readline().split(), repeat(10, q))
    a = [x - 1 for x in a]
    l = [[] for i in xrange(m)]
    la = []
    for i in xrange(q - 1, -1, -1):
        x = a[i]
        if not l[x]:
            la.append(x)
        l[x].append(i)
    ok = 1
    b = [q] * n
    f = [0] * m
    xt = 0
    for i, x in enumerate(la):
        j = 0
        for y in l[x]:
            if j < n and y < b[j]:
                b[j] = y
                j += 1
        if j < n:
            ok = 0
            b[j] = -1
        if not ok:
            while f[xt]:
                  xt += 1
            if x != xt:
                print "No"
                return
            f[xt] = 1
        else:
            f[x] = 1
    print "Yes"
main()
maxs=[]
while(True):
    max=0
    
    b=list(map(int,input().split()))
    n=b[0]
    m=b[1]
    if(n == 0 and m == 0):
        break
    a=list(map(int,input().split()))
    for i in range(n):
        for j in range(i+1,n):
            sum=a[i]+a[j]
            if(sum>max and sum<m):
                max=sum
    
    maxs.append(max)
for i in maxs:
    if maxs[i]==0:
        print("NONE")
    else:
        print(maxs[i])




### FIXED CODE ###

maxs=[]
while(True):
    max=-1
    
    b=list(map(int,input().split()))
    n=b[0]
    m=b[1]
    if(n == 0 and m == 0):
        break
    a=list(map(int,input().split()))
    for i in range(n):
        for j in range(i+1,n):
            sum=a[i]+a[j]
            if(sum>max and sum<=m):
                max=sum
    maxs.append(max)

for i in maxs:
    if i==-1:
        print("NONE")
    else:
        print(i)
#abc081c
import collections
import sys

n,k=map(int,raw_input().split())
a=map(int,raw_input().split())
if n==k:
 print 0
 sys.exit()
cnt=collections.Counter(a)
l=[]
for k1,v in cnt.items():
 l.append(v)
l2=sorted(l,reverse=True)
temp=0
for i in xrange(k):
 temp+=l2[i]
print n-temp


### FIXED CODE ###

#abc081c
import collections

n,k=map(int,raw_input().split())
a=map(int,raw_input().split())
cnt=collections.Counter(a)
l=[]
for k1,v in cnt.items():
 l.append(v)
l2=sorted(l,reverse=True)
temp=0
for i in xrange(min(k,len(l2))):
 temp+=l2[i]
print n-temp
N = int(input())
X = []
Y = []
for _ in range(N):
    x,y = map(int, input().split())
    X.append(x)
    Y.append(y)
X = np.array(X)
Y = np.array(Y)
X_ = X.reshape((N,1))
Y_ = Y.reshape((N,1))
Z = np.abs(X-X_)+np.abs(Y-Y_)
z = Z.reshape((1,-1))
print(np.max(z))

### FIXED CODE ###

# ABC178D Manhattan
n = int(input())
z = []
w = []
for i in range(n):
    x,y = map(int, input().split())
    z.append(x-y)
    w.append(x+y)
    
z_ans = max(z)-min(z)
w_ans = max(w)-min(w)
print(max(z_ans,w_ans))
N = int(input())
s = []
ans = []
for _ in range(N):
    inp = int(input())
    s.append(inp)
mx = 0
for bit in range(1<<N):
    sums = 0
    for i in range(N):
        mask = 1<<i
        if mask&bit:
            sums += s[i]
        
    if mx < sums:
        if sums%10!=0:
            mx = sums

print(answer)

### FIXED CODE ###

N = int(input())
s = []
for _ in range(N):
    inp = int(input())
    s.append(inp)
s = sorted(s)
sm = sum(s)
if sm%10!=0:
    ans = sm
else:
    for i in s:
        if i%10!=0:
            sm-=i
            break
    ans = sm
    if sm==sum(s):
        ans = 0
print(ans)
# coding: utf-8
from math import gcd
import math

def main():
    a, b = input().split()
    a, b = int(a), int(b)

    if b > a:
        a, b = b, a

    relative_primes = []
    greatest_cd = gcd(a, b)
    for i in range(2, greatest_cd+1):
        if greatest_cd % i > 0:
            continue
            
        flg = True
        for rp in relative_primes:
            if i % rp == 0:
                flg = False
                continue
        if flg:
            relative_primes.append(i)
    print(len(relative_primes)+1)
    

main()

### FIXED CODE ###

# coding: utf-8

def greatest_common_divisor(N, M):
    assert N >= M
    while M != 0:
        N, M = M, N%M
    return N

def prime_divisor(N):
    temp = N
    for n in range(2, int(-(-N**0.5//1))+1):
        if temp % n == 0:
            while temp % n == 0:
                temp //= n
            yield n
    if temp != 1:
        yield temp
        

def main():
    a, b = input().split()
    a, b = int(a), int(b)

    if a > b:
        a, b = b, a

    gcd = greatest_common_divisor(b, a)
    pdiv = [pd for pd in prime_divisor(gcd)]
    print(len(pdiv)+1)

main()
N = int input()
sen = N / 1000:

for 1000 in 10000:
  if N % 1000 == 0：
  print(0)
else:
  print(sen + 1000-N)

### FIXED CODE ###

#! /usr/bin/python3

N = int(input())
1 <= N <= 10000

if N % 1000 == 0:
 print(0)
else:
  sen = N//1000
  sen2 = sen*1000
  atai = N-sen2
  atai2 = 1000-atai
  print(atai2)
a, b, c = map(int, input().split())
k = int(input())
for i in range(k):
  if a >= b and a >= c:
    a *= 2
  elif b >= a and b >= c:
    b *= 2
  else:
    c *= 2
print(sum(a, b, c))

### FIXED CODE ###

a, b, c = map(int, input().split())
k = int(input())
for i in range(k):
  if a >= b and a >= c:
    a *= 2
  elif b >= a and b >= c:
    b *= 2
  else:
    c *= 2
print(sum([a, b, c]))
a,b=map(int,input().split())
if abs(a-c)==abs(b-c):
  print(c)
else:
  print('IMPOSSIBLE')


### FIXED CODE ###

a,b=map(int,input().split())
if (a+b)%2==0:
  print((a+b)//2)
else:
  print('IMPOSSIBLE')
N = int(input())
B = list(map(int,input().split()))
TF = [False]*N
L = []
s = 0
lenstr = N-1
for i in range(N):
  cnt = 0
  tr = 0
  for j in range(N-1,-1,-1):
    if TF[j] == False:
      if B[lenstr-cnt-tr+i] == lenstr-cnt+1:
        TF[lenstr-cnt-tr+i] = True
        L.append(lenstr-cnt+1)
        lenstr -= 1
        break
      else:
        cnt += 1
    else:
      tr += 1
if len(L) == N:
  for i in range(N):
    print(L[N-i-1])
else:
  print(-1)

### FIXED CODE ###

N = int(input())
B = list(map(int,input().split()))
TF = [False]*N
L = []
s = 0
lenstr = N-1
for i in range(N):
  cnt = 0
  tr = 0
  for j in range(N-1,-1,-1):
    if TF[j] == False:
      if lenstr-cnt-tr+i <= N-1:
        if B[lenstr-cnt-tr+i] == lenstr-cnt+1:
          TF[lenstr-cnt-tr+i] = True
          L.append(lenstr-cnt+1)
          lenstr -= 1
          break
        else:
          cnt += 1
      else:
          print(-1)
          exit()
    else:
      tr += 1
if len(L) == N:
  for i in range(N):
    print(L[N-i-1])
else:
  print(-1)