Harryxun/stf_run huggingface dataset:
N = int(input())
A = list(int(i) for i in input().split())

A.sort()


if((A[1] - A[0]) == 0):
    min_HP = A[0]
else:
    min_HP = 0
    while((A[1] - A[0]) > 0):
        A.insert(0, A[1] - A[0])
        A.sort()
        if((A[1] - A[0]) == 0):
            break
        min_HP = A[1] - A[0]

tmp_min = min_HP
for a in A:
    if ((a % tmp_min) < min_HP):
        min_HP = tmp_min

print(min_HP)

### FIXED CODE ###

N = int(input())
A = list(int(i) for i in input().split())

A.sort()


if((A[1] - A[0]) == 0):
    min_HP = A[0]
    print(min_HP)
else:
    min_HP = A[1] - A[0]
    while((A[1] - A[0]) > 0):
        A.insert(0, A[1] - A[0])
        A.sort()
        if((A[1] - A[0]) == 0):
            break
        min_HP = A[1] - A[0]

    # そのループでまだmin_HPが更新されていない
    while(True):
        min_flag = False
        for a in A:
            if ((a % min_HP) < min_HP and (a % min_HP) > 0):
                min_HP = a % min_HP
                min_flag = True
        if( min_HP > 0 and min_flag ):
            continue
        else:
            break
    print(min_HP)
package main

import (
	"fmt"
	"sort"
	"strconv"
)

type Restaurant struct {
	S string
	P int
	Idx int
}

func solve() {
	var ts string
	var N int
	fmt.Scan(&N)

	var restaurants []Restaurant
	for i := 0; i < N; i++ {
		var s string
		fmt.Scan(&s, &ts)
		p, _ := strconv.Atoi(s)
		restaurants = append(restaurants, Restaurant{s, p, i+1})
	}
	sort.SliceStable(restaurants, func(i, j int) bool {
		if restaurants[i].S != restaurants[j].S {
			return restaurants[i].S < restaurants[j].S
		}
		return restaurants[i].P > restaurants[j].P
	})
	for _, r := range restaurants {
		println(r.Idx)
	}
}

func main() {
	solve()
}


### FIXED CODE ###

def main():
    N = int(input())
    data = []
    for i in range(N):
        s, p = input().split()

        data.append((s, 100 - int(p), i+1))

    for s, p, i in sorted(data):
        print(i)


if __name__ == '__main__':
    main()
N = map(int, input())
print((N -2) * 180)

### FIXED CODE ###

N = int(input())
print((N -2) * 180)
import collections
import math
n,m=map(int,input().split())
flag=0
P=[]
p=m
while flag==0:
  cur=p
  for i in range(2,int(p**0.5)+1):
    if p%if==0:
      P.append(i)
      p//=i
      break
  if p==cur:
    P.append(p)
    flag=1
c=collections.Counter(P)
Primes=set(P)
def f(i):
  return math.factorial(i)
def fn(i):
  return f(n+i-1)//(f(n-1)*f(i))
ans=1
for p in Primes:
  ans*=fn(c[p])
print(ans) 

### FIXED CODE ###

import collections
import math
n,m=map(int,input().split())
flag=0
P=[]
p=m
while flag==0:
  cur=p
  for i in range(2,int(p**0.5)+1):
    if p%i==0:
      P.append(i)
      p//=i
      break
  if p==cur:
    P.append(p)
    flag=1
c=collections.Counter(P)
Primes=set(P)
def f(i):
  return math.factorial(i)
def fn(i):
  return f(n+i-1)//(f(n-1)*f(i))%(10**9+7)
ans=1
for p in Primes:
  ans*=fn(c[p])
  ans%=(10**9+7)
print(1 if m==1 else ans)
N,K = map(int,input().split())
A = list(map(int,input().split()))

ch = 1
ind = 0
bits = [ch]
while ch*2 <= K:
    ind += 1
    ch *= 2
    bits.append(ch)

#print(ch,ind)
#ch_max = 2**(ind+1) -1
#print(ch_max)

tmp = [0 for _ in range(ind+1)]

for a in A:
    for i,bit in enumerate(bits):
        if a & bit:
            tmp[i] = tmp[i] + 1
#print(tmp)

ans_x = 0
for i,t in enumerate(tmp):
    if 2*t < N and K > 0:# and ans_x + bits[i] <= K:
        ans_x += bits[i]
#        print('koko')
    else:
        ans_x += 0
#        print(bits[i])

ans = 0
if ans_x <= K:
    for n in range(N):
        ans += ans_x ^ A[n]
else:
    ans_max = 0
    for i in range(min(100,K)):
        ans_tmp = 0
        for n in range(N):
            ans_tmp += (K-i) ^ A[n]
        ans_max = max(ans_tmp,ans_max)

    ans = ams_max

    # for i in range(ans_x - bits[-1],K+1):
    #     ans_x2 = i
    #     ans_tmp = 0
    #     for n in range(N):
    #         ans_tmp += ans_x2 ^ A[n]
    #     ans_max = max(ans_max, ans_tmp)

    # ans = ans_max

print(ans)


### FIXED CODE ###

#https://atcoder.jp/contests/abc117/submissions/4165407
n,k=map(int,input().split())
a=list(map(int,input().split()))
t,ans=2**40,0
while t:
    c=sum([(a[i]&t)//t for i in range(n)])
    if k<t or c*2>=n:
        ans+=t*c
    else:
        ans+=t*(n-c)
        k -= t
    t //= 2

print(ans)
from fractions import gcd
N = int(input())
arr = []

def get_unique_list(seq):
    seen = []
    return [x for x in seq if x not in seen and not seen.append(x)]


for i in range(N):
    arr.append(list(map(int, input().split())))

C = []
for i in range(N):
    for j in range(N):
        if i < j:
            x = arr[i][0]-arr[j][0]
            y = arr[i][1]-arr[j][1]
            g = gcd(x, y)
            x = int(x / g)
            y = int(y / g)
            C.append([x, y])

C = get_unique_list(C)
S = [0 for i in range(len(C))]

for c in range(len(C)):
    tmp = []
    for i in range(N):
        if C[c][0] != 0:
            tmp.append(round(arr[i][1] - arr[i][0]/C[c][0]*C[c][1],15))
        else:
            tmp.append(round(arr[i][0] - arr[i][1]/C[c][1]*C[c][0],15))
    tmp = list(set(tmp))
    S[c] = len(tmp)

print(min(S))


### FIXED CODE ###

import sys
N = int(input())
arr = []

for i in range(N):
    arr.append(list(map(int, input().split())))

if N == 1:
    print(1)
    sys.exit()

d = {}

for i in range(N):
    for j in range(N):
        if i != j:
            x = arr[i][0] - arr[j][0]
            y = arr[i][1] - arr[j][1]
            if (x, y) in list(d.keys()):
                d[(x, y)] += 1
            else:
                d[(x, y)] = 1

print(N - max(list(d.values())))
from functools import reduce
from operator import mul
def prime_factorize_dict(n, N):
    d = {1: 50}
    while not n & 1:
        d[2] = d.get(2, 0) + 1
        n >>= 1
    f = 3
    while f * f <= n:
        if not n % f:
            d[f] = d.get(f, 0) + 1
            n //= f
        else:
            f += 2
    if n != 1:
        d[n] = d.get(n, 0) + 1
    return d

N, P = map(int, input().split())
factors, powers = zip(*((factor, power) for factor, power in prime_factorize_dict(P, N).items() if power >= N))
print(reduce(mul, (factor ** (min(powers) // N) for factor in factors)))

### FIXED CODE ###

from functools import reduce
from operator import mul
def prime_factorize_dict(n, N):
    d = {1: 1}
    while not n & 1:
        d[2] = d.get(2, 0) + 1
        n >>= 1
    f = 3
    while f * f <= n:
        if not n % f:
            d[f] = d.get(f, 0) + 1
            n //= f
        else:
            f += 2
    if n != 1:
        d[n] = d.get(n, 0) + 1
    return d

N, P = map(int, input().split())
print(reduce(mul, (factor ** (power // N) for factor, power in prime_factorize_dict(P, N).items())))
K = int(input)
m = K//2
print(m*(K-m))

### FIXED CODE ###

K = int(input())
m = K//2
print(m*(K-m))
import numpy as np
N,Y = map(int,input().split())
satu = np.array([10000,5000,1000])
lst = []
flag = True
for i in range(N+1):
    for j in range(N+1):
        if(N-i-j)>=0:
            lst.append(np.array([i,j,N-i-j]))
for i in range(len(lst)):
    gaku = np.dot(satu,lst[i])
    if gaku == Y:
        print(lst[i][0],lst[i][1],lst[i][2])
        #print("{} {} {}".format(lst[i]))
        flag = False
        break
if flag:
    print("-1 -1 -1")


### FIXED CODE ###

n,y = map(int,input().split())

satu = [1000,5000,10000]

sen = [1000 * i for i in range(n+1)]
gsen = [5000 * i for i in range(n+1)]
man = [10000 * i for i in range(n+1)]

#print(sen,gsen,man)
for i in range(n+1):
    for j in range(n+1-i):
        if man[i]+ gsen[j] + sen[n-i-j] == y:
            print(i,j,n-i-j)
            exit()

print("-1 -1 -1")
text = raw_input()
count = {} #a~zの出現回数を記録

for i in range(26):
    count[(i)] = 0
    
for i in range(len(text)):
    if(ord(text[i]) >= ord('a') and ord(text[i]) <= ord('z')):
        count[(ord(text[i]))-ord('a')] += 1
    if(ord(text[i]) >= ord('A') and ord(text[i]) <= ord('Z')):
        count[(ord(text[i]))-ord('A')] += 1

#出現回数の表示
for i in range(26):
    print '%s : %d' %(unichr(i+ord('a')), count[(i)])

### FIXED CODE ###

count = {}
for i in range(26):
    count[(i)] = 0

while True:
    try:
        x = raw_input()
    except:
        break
    for i in range(len(x)):
        if(ord('a') <= ord(x[i]) and ord(x[i]) <= ord('z')):
            count[(ord(x[i])-ord('a'))] += 1
        elif(ord('A') <= ord(x[i]) and ord(x[i]) <= ord('Z')):
            count[(ord(x[i])-ord('A'))] += 1

for i in range(26):
    print '%s : %d' %(chr(i+ord('a')), count[(i)])
exit(0)
H,W = map(int,input().split())
h,w = map(int,input().split())
cells = [[1]*W]*H
print(cells)
del cells[:h]
print(cells)
cells = list(zip(*cells))
del cells[:w]
cells = list(zip(*cells))
print(sum(list(map(sum,[*cells]))))

### FIXED CODE ###

import sys
input = sys.stdin.readline
H,W = map(int,input().rstrip().split())
h,w = map(int,input().rstrip().split())
cells = [[1]*W]*H
cells = cells[h:]
cells = list(zip(*cells))
cells = cells[w:]
print(sum(list(map(sum,list(zip(*cells))))))
r, c = map(int, raw_input().split())
sum_c = [0 for x in range(r)]
sum_r = [0 for x in range(c)]
sum = 0

for i in range(r):
    column = map(int, raw_input().split())
    for j in range(c):
        sum_c[i] += column[j]
        sum_r[j] += column[j]
        sum = column[j]
    print(" ".join(map(str, column) + " " + str[sum_c[i]]

print (" ".joint(map(str, sum_r) + " " + str(sum))

### FIXED CODE ###

r, c = map(int, raw_input().split())
sum_c = [0 for x in range(r)]
sum_r = [0 for x in range(c)]
sum = 0

for i in range(r):
    column = map(int, raw_input().split())
    for j in range(c):
        sum_c[i] += column[j]
        sum_r[j] += column[j]
        sum += column[j]
    print(" ".join(map(str, column)) + " " + str(sum_c[i]))

print (" ".join(map(str, sum_r)) + " " + str(sum))
n, k = map(int, input().split())
a = list(map(int,input().split()))

a_p =[]
a_m =[]
for i in a:
    if i >= 0:
        a_p.append(i)
    else :
        a_m.append(i)

a_p.sort()
a_m.sort(reverse=True)


a_select =[]

if n == k:
    a_select = a
elif len(a_p) == 0:
    for i in range(k):
        a_select.append(a_m[i])


while len(a_select) < k:
    if len(a_select) == k - 1:
        a_select.append(a_p[-1])
        break
    if len(a_p) == 1 and (k-len(a_select))%2 == 1:
        a_select.append(a_p[-1])
    elif len(a_p) == 0:
        a_select.append(a_m.pop(-1))
        a_select.append(a_m.pop(-1))
    elif len(a_m) <= 1:
        a_select.append(a_p.pop(-1))
    elif a_p[-1]*a_p[-2] > a_m[-1]*a_m[-2] :
        a_select.append(a_p.pop(-1))
    else:
        a_select.append(a_m.pop(-1))
        a_select.append(a_m.pop(-1))

#print(a_select)
ans = 1
for i in a_select:
    ans = ans*i % (10**9 + 7)

print(ans)


### FIXED CODE ###

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

a_p =[]
a_m =[]
for i in a:
    if i >= 0:
        a_p.append(i)
    else :
        a_m.append(i)

a_p.sort()
a_m.sort(reverse=True)


a_select =[]

if n == k:
    a_select = a
elif len(a_p) == 0 and k%2 == 1:
    for i in range(k):
        a_select.append(a_m[i])


while len(a_select) < k:
    if len(a_select) == k - 1:
        a_select.append(a_p[-1])
        break
    if len(a_p) == 1 and (k-len(a_select))%2 == 1:
        a_select.append(a_p.pop(-1))
    elif len(a_p) == 1 and (k-len(a_select))%2 == 0:
        a_select.append(a_m.pop(-1))
        a_select.append(a_m.pop(-1))
    elif len(a_p) == 0:
        a_select.append(a_m.pop(-1))
        a_select.append(a_m.pop(-1))
    elif len(a_m) <= 1:
        a_select.append(a_p.pop(-1))
    elif a_p[-1]*a_p[-2] > a_m[-1]*a_m[-2] :
        a_select.append(a_p.pop(-1))
    else:
        a_select.append(a_m.pop(-1))
        a_select.append(a_m.pop(-1))

#print(a_select)
ans = 1
for i in a_select:
    ans = ans*i % (10**9 + 7)

print(ans)
N,A,B=map(int,input().split())

print(sum(i in i range(1,N+1)
         if A<=sum(map(int,str(i))<=B))

### FIXED CODE ###

a,b,c,d = map(int,input().split())
if a+b > c+d:
    print('Left')
elif a+b == c+d:
    print('Balanced')
else:
    print('Right')
N = int(input())

ans = 0


for x in range(1, N + 1):
    ans_ = 0
    k = x
    for y in range(999):
        if x % 2 == 0:
            x /= 2
            ans_ += 1
        else:
            break
    if ans_ > ans:
        ans = ans_
        kk = k
print(kk)

### FIXED CODE ###

N = int(input())

ans = 0

kk = 1
for x in range(1, N + 1):
    ans_ = 0
    k = x
    for y in range(999):
        if x % 2 == 0:
            x /= 2
            ans_ += 1
        else:
            break
    if ans_ > ans:
        ans = ans_
        kk = k
print(kk)
def main():
    _ = int(input())
    A = list(int(c) for c in input().split(' '))

    if len(A) == 2 and A[0] == A[1]:
        return 1000

    tmp = []
    for i in range(len(A)-1):
        if A[i] != A[i+1]:
            tmp.append(A[i])
    if A[-1] != tmp[-1]:
        tmp.append(A[-1])
    A = tmp
    #print(A)

    money = 1000
    if len(A) < 2:
        return 1000

    if len(A) == 2:
        if A[0] < A[1]:
            kabu = money // A[0]
            money -= kabu*A[0]
            money += kabu*A[1]
            return money
        else:
            return 1000

    l = []
    kabu = 0
    if A[1] > A[0]:
        ascending = True
        kabu = money // A[0]
        money -= kabu*A[0]
    else:
        ascending = False
    for i in range(len(A)-1):
        #print(A[i],kabu,money)
        if ascending:  #上昇中
            if A[i] > A[i+1]:
                #下降に転じたので売り
                if kabu > 0:
                    money += kabu*A[i]
                    kabu = 0
                    ascending = False
                else:
                    pass
            else:
                continue
        else:  #下降中
            if A[i] < A[i+1]:
                #上昇したので買い
                assert kabu == 0
                kabu = money // A[i]
                money -= kabu*A[i]
                ascending = True
            else:
                continue
    if kabu > 0:
        money += kabu*A[-1]
        kabu = 0
    return money
if __name__ == "__main__":
    ret = main()
    print(ret)

### FIXED CODE ###


def main():
    _ = int(input())
    A = list(int(c) for c in input().split(' '))

    tmp = []
    for i in range(len(A)-1):
        if A[i] != A[i+1]:
            tmp.append(A[i])
    if len(tmp) == 0:
        return 1000
    if A[-1] != tmp[-1]:
        tmp.append(A[-1])
    A = tmp
    #print(A)

    money = 1000
    if len(A) < 2:
        return 1000

    if len(A) == 2:
        if A[0] < A[1]:
            kabu = money // A[0]
            money -= kabu*A[0]
            money += kabu*A[1]
            return money
        else:
            return 1000

    l = []
    kabu = 0
    if A[1] > A[0]:
        ascending = True
        kabu = money // A[0]
        money -= kabu*A[0]
    else:
        ascending = False
    for i in range(len(A)-1):
        #print(A[i],kabu,money)
        if ascending:  #上昇中
            if A[i] > A[i+1]:
                #下降に転じたので売り
                if kabu > 0:
                    money += kabu*A[i]
                    kabu = 0
                    ascending = False
                else:
                    pass
            else:
                continue
        else:  #下降中
            if A[i] < A[i+1]:
                #上昇したので買い
                assert kabu == 0
                kabu = money // A[i]
                money -= kabu*A[i]
                ascending = True
            else:
                continue
    if kabu > 0:
        money += kabu*A[-1]
        kabu = 0
    return money
if __name__ == "__main__":
    ret = main()
    print(ret)
N, M = list(map(int, input().split()))
A =[0]*M
for i in range(M):
    A[i] = int(input())

amari = 1000000007
cnt = [0]*(N+1)
cnt[0] = 0
cnt[1] = 1
cnt[2] = 2 
for i in range(3,N+1):
    t = (cnt[i-1]+cnt[i-2])
    cnt[i] = t % amari

ans = 1
for i in range(M): 
    if i == 0:
        if A[i] != 1:
            ans*= cnt[A[i]-1]
    elif i > 0 and i < M:
        ans*=cnt[A[i] - A[i-1] - 1]

    if i == M-1:
        if A[i] != N -1:
            ans*= cnt[N - A[i]]
    
    if ans == 0:
        break
  
    ans %= amari

print(ans)

### FIXED CODE ###

N, M = list(map(int, input().split()))
A =[0]*M
for i in range(M):
    A[i] = int(input())

amari = 1000000007
cnt = [0]*(N+2)
cnt[0] = 0
cnt[1] = 1
for i in range(2,N+2):
    t = (cnt[i-1]+cnt[i-2])
    cnt[i] = t % amari

ans = 1
def calc(ans):
    if M == 0:
        return cnt[N+1]

    for i in range(M): 
        if i == 0:
            ans*= cnt[A[i]]
        elif i > 0 and i < M:
            ans*=cnt[A[i] - A[i-1]-1]

        if i == M-1:
            ans*= cnt[N - A[i]]
        
        if ans == 0:
            break
    
        ans %= amari
        
    return ans

print(calc(ans))
def edit_distance(d)
 n =len(d)
 A=[[0 for i inrange(n)] for j in range(n)]
 for long in range(0,n+1-long):
  k=i-1+long
  def f(i,j,k):
   return A[i][j-1]+A[j][k]+]+M[i][0]*M[j-1][1]*M[k][1]
   A[i][k] = min([f(i,j,k) for j in range(i+1,k+1)])
 return A[0][n-1]
n = input()
M = []
for i in range(n):
 M.append(map(int, raw_input().split()))
print edit_distance (M)

### FIXED CODE ###

def edit_distance(M):
  n = len(M)



  m = [[0 for i in range(n)] for j in range(n)]
   
  for long in range(2, n+1):

    for i in range(0, n-long+1):

      j = i + long - 1

      def a(i, k ,j):
        return m[i][k] + m[k+1][j] + M[i][0]*M[k][1]*M[j][1]
      m[i][j] = min(a(i, k, j) for k in range(i, j))
   
  return m[0][n-1]
 
n = input()
M = []
 
for i in range(n):
  M.append(map(int, raw_input().split()))
print edit_distance(M)
def main(money):
  a  = money % 1000
  if a != 0:
    change = 1000 - a
    return change
  elif a = 0:
    change = 0
    return change
  print(change)

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Sun Jul  5 20:25:04 2020

@author: KevinLU
"""
money = int(input())

a  = money % 1000
if a > 0:
    change = 1000 - a
else:
    change = 0
print(change)
N, T = map(int, input().split())
t = list(map(int, input().split()))
t += t[-1]*2

ans = 0
for i in range(N):
    ans += min(T, t[i+1] - t[i])

print(ans)

### FIXED CODE ###

N, T = map(int, input().split())
t = list(map(int, input().split()))
t += [T+t[-1]]

ans = 0
for i in range(N):
    ans += min(T, t[i+1] - t[i])

print(ans)
n, *a = map(int, input().split())
li = []
sorted_a = sorted(a)
for i in range(n):
    if sorted_a[i] != a[i]:
        cnt +=1
        li.append(i)
        


def hantei(n, a, li):
    if len(li) >= 3:
        return('NO')

    elif len(li) <= 1:
        return('YES')

    else:
        a[li[0]], a[li[1]] = a[li[1]], a[li[0]]
        print(li)
        for i in range(n):
            if sorted_a[i] != a[i]:
                return('NO')
        return('YES')

    
print(hantei(n, a, li))

### FIXED CODE ###

from collections import defaultdict, deque
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate
import sys


def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LIM(): return list(map(lambda x:int(x) - 1, sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def LIRM(n): return [LIM() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
mod = 1000000007


def main():
    n = I()
    num = LI()
    for i in range(n):
        for j in range(n):
            tmp = num.copy()
            tmp[i], tmp[j] = tmp[j], tmp[i]
            if tmp == sorted(num):
                return 'YES'
    return 'NO'


print(main())
fun main()
{
    var has = readLine()!!.toInt()
    var happiness = 0
    if (has > 500)
    {
        var _500 = has / 500
        happiness = _500 * 1000
        has = has - _500 * 500
    }
    if (has > 5)
    {
        var _5 = has / 5
        happiness += _5 * 5
    }
    print(happiness)
}

### FIXED CODE ###

has = int(input())
canbe = 0
_500, has = divmod(has, 500)
canbe += _500 * 1000
_5, has  = divmod(has, 5)
canbe += _5 * 5
print(canbe)
str = N

if(str[0] == '7' || str[1] == '7' || str[2] == '7'):
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N = input()
s = str(N)

if s[0] == '7' or s[1] == '7' or s[2] == '7':
  print('Yes')
else:
  print('No')
n, k = int(input().split())
if k == 1 : print(0)
else print(n - k)

### FIXED CODE ###

n, k = map(int, input().split())
if k == 1 : print(0)
else : print(n - k)
import numpy as np
import scipy.sparse
N,X,Y = (int(x) for x in input().split())
lil = scipy.sparse.lil_matrix((N, N), dtype=int)
for i in range(N-1):
    lil[i, i+1] = 1
    lil[i+1, i] = 1
lil[X-1, Y-1] = 1
lil[Y-1, X-1] = 1
lil2 = scipy.sparse.csgraph.shortest_path(lil)
for i in range(1,N):
    print((np.count_nonzero(lil2 == i)) // 2)

### FIXED CODE ###

import numpy as np
import scipy.sparse
N,X,Y = (int(x) for x in input().split())
lil = scipy.sparse.lil_matrix((N, N), dtype = int)
for i in range(N-1):
    lil[i, i+1] = 1
    lil[i+1, i] = 1
lil[X-1, Y-1] = 1
lil[Y-1, X-1] = 1
lil2 = scipy.sparse.csgraph.dijkstra(lil, directed = False).astype(int)
ans = np.bincount(lil2.ravel(), minlength = N) // 2
for i in range(1,N):
    print(ans[i])
s=str(input())
t=str(input())
ans=0
f=[]
g=len(s)
h=len(t)
for i in range(g-h):
    for j in range(h):
        if s[i+j]!=t[j]:
            ans+=1
    f.append(ans)
    ans=0
f.sort()
print(int(f[0]))

### FIXED CODE ###

S = input()
T = input()
n = len(S)
m = len(T)
x = int(1e9)
for i in range(n-m+1):
  cnt = 0
  for j in range(m):
    cnt += (S[i+j] != T[j])
  x = min(x, cnt)
print(x)
N = int(input())
s = []

for i in range(N):
    s.add(input())
    
print(len(s))

### FIXED CODE ###

N = int(input())
s = set()

for i in range(N):
    s.add(input())
    
print(len(s))
a = list(map(int, input().split()))
a = sorted(a)
print(abs(a[3] - a[1]))

### FIXED CODE ###

a = list(map(int, input().split()))
a = sorted(a)
print(abs(a[2] - a[0]))