Harryxun/stf_run huggingface dataset:
import random

def main():
    N = int(input().strip())
    cand = []
    for i in range(30000 // 6):
        cand.append(6 * i + 2)
        cand.append(6 * i + 3)
        cand.append(6 * i + 4)
        cand.append(6 * i + 6)

    while True:
        S = random.choices(cand, k=N)
        if sum(S) % 6 == 0:
            break
    return ' '.join(map(str, S))


if __name__ == '__main__':
    print(main())


### FIXED CODE ###



def main():
    N = int(input().strip())

    o = [6, 2, 10, 3, 9, 4, 8, 12]
    e = [2, 10, 3, 9, 4, 8, 6, 12]
    if N == 3:
        S = [2, 5, 63]
    else:
        l = o if N % 2 != 0 else e
        S = []
        for i in range(N):
            S.append(l[i % len(l)] + 12*(i//len(l)))

    return ' '.join(map(str, S))


if __name__ == '__main__':
    print(main())
if int(input()) < 1200:
    print("ABC")
elif int(input()) < 2800:
    print("ARC")
else:
    print("AGC")

### FIXED CODE ###

R = int(input())

if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
elif R <= 4208:
    print("AGC")
else:
    print("")
#36 ABC127D
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
bc=[list(map(int,input().split())) for _ in range(m)]
bc=sorted(bc, key=lambda x:-x[1])

i=0
for b,c in bc:
	while(a[i]<c and b>0 and i<n):
		a[i]=c
		b-=1
		i+=1
print(sum(a))

### FIXED CODE ###

#36 ABC127D
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
bc=[list(map(int,input().split())) for _ in range(m)]
bc=sorted(bc, key=lambda x:-x[1])

i=0
for b,c in bc:
	while(i<n and a[i]<c and b>0):
		a[i]=c
		b-=1
		i+=1
print(sum(a))
import numpy as np

def dfs(i, cost, A):
    if i == n-1:
        global ans
        if cost < ans and all([ai>=x for ai in A]):
            ans = cost
        return
    
    i += 1
    dfs(i, cost, A[:])
    dfs(i, cost+c[i], A[:]+a[i])

    
        
        

if __name__ == "__main__":
    n, m, x = map(int, input().split())
    c, a = [None]*n, np.array([None]*n)
    for i in range(n):
        c[i], *a[i] = map(int, input().split())
    ans = 10**20
    dfs(-1, 0, np.array([0]*m))
    print(ans)

### FIXED CODE ###

import numpy as np
import sys
sys.setrecursionlimit(100000)

def main():
    n, m, x = map(int, input().split())
    cl = [None]*n
    al = [None]*n
    total = np.array([0]*m)
    global ans
    ans = 10**7
    for i in range(n):
        c, *a = map(int, input().split())
        a = np.array(a)
        cl[i] = c
        al[i] = a
        total += a
    def dfs(i, cost, A):
        i += 1
        if i == n:
            global ans
            if all([ai >= x for ai in A]) and ans > cost:
                ans = cost
            return
        dfs(i, cost, A[:])
        dfs(i, cost+cl[i], A[:]+al[i])
    dfs(-1, 0, np.array([0]*m))
    if ans == 10**7:
        print(-1)
    else:
        print(ans)
        

if __name__ == "__main__":
    main()
a=int(input())
b=int(input())
c=int(input())

if a%b==0:
	print(c*(a/b))
else:
		print((c*((a//b)+1)))

### FIXED CODE ###

a = list(map(int, input().split()))
if a[0]%a[1]==0:
  print((a[0]//a[1])*a[2])
else:
  print(a[2]*(a[0]//a[1])+a[2])
n = int(input())
a = input().split(" ")
b = set(a)
print "YES" if len(b) > len(a) else "NO"

### FIXED CODE ###

n = int(input())
a = input().split(" ")
b = set(a)
if len(b)<len(a):
    print("NO")
else:
    print("YES")
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

n=ii()
arr=mii()

cnt=0
for i in range(n):
    if arr[i]%2=1:
        cnt+=1

if cnt%2=1:
    print("NO")
else:
    print("YES")



### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

n=ii()
arr=limii()

cnt=0
for i in range(n):
    if arr[i]%2==1:
        cnt+=1

if cnt%2==1:
    print("NO")
else:
    print("YES")
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]
 
print(a[input()-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]
b = int(input())
print(a[b-1])
import math

N,X = map(int,input().split())
x = list(map(int,input().split()))
distance = []

for i in x:
    distance.append(abs(i-X))

while True:
    if len(distance) > 1:
        cd = math.gcd(distance[0],distance[1])
        del distance[0]
        del distance[0]
        distance.append(cd)
        if len(distance) == 1:
            print(distance[0])
            exit()
    else:
        print(distance[0])
        exit()


### FIXED CODE ###

from functools import reduce
import fractions

N, X = map(int,input().split())
x = list(map(int,input().split()))
x = list(map(lambda x:abs(x-X), x))
x = reduce(lambda a,b: fractions.gcd(a,b), x)
print(x)
a,b=int(input())
if a+b==15:
    print("+")
elif a*b==15:
    print("*")
else:
    print("x")


### FIXED CODE ###

a,b=map(int,input().split())
if a+b==15:
    print("+")
elif a*b==15:
    print("*")
else:
    print("x")
N = int(input())
a = list(map(int, input().split()))

min_color = 0
max_color = 0

cnt = 0

color = [0] * 8

for i in a:
    if i < 400 and color[0] == 0:
        min_color += 1
        max_color += 1
        color[0] = 1

    elif 400 <= i and i < 800 and color[1] == 0:
        min_color += 1
        max_color += 1
        color[1] = 1

    elif 800 <= i and i < 1200 and color[2] == 0:
        min_color += 1
        max_color += 1
        color[2] = 1

    elif 1200 <= i and i < 1600 and color[3] == 0:
        min_color += 1
        max_color += 1
        color[3] = 1

    elif 1600 <= i and i < 2000 and color[4] == 0:
        min_color += 1
        max_color += 1
        color[4] = 1

    elif 2000 <= i and i < 2400 and color[5] == 0:
        min_color += 1
        max_color += 1
        color[5] = 1

    elif 2400 <= i and i < 2800 and color[6] == 0:
        min_color += 1
        max_color += 1
        color[6] = 1

    elif 2800 <= i and i < 3200 and color[7] == 0:
        min_color += 1
        max_color += 1
        color[7] = 1

    elif i >= 3200:
        max_color += 1
        cnt += 1

if cnt == N:
    min_color = 1

print(min_color, max_color)


### FIXED CODE ###

r, g, b = map(int, input().split())
ans = r * 100 + g * 10 + b

print("YES" if ans % 4 == 0 else "NO")
n = int(input())
data = map(int, input().split())
up = 0
for i in range(n):
  up *= data[i]
 
down = 0
for j in range(n):
  down += up / data[j]
 
print(up / down)

### FIXED CODE ###

def main():
    n = int(input())
    data = list(map(int, input().split()))

    for k in data:
        if k == 0:
            return 0

    up = 1
    for i in range(n):
        up *= data[i]

    down = 0
    for j in range(n):
        down += up / data[j]

    return (up / down)

print(main())
n = int(input())
a = list(map(int, input().split()))
s = sum(a)
r = 0
counter = 0
while r < s//2:
    r += a[counter]
    counter += 1
x = sum(a[:counter])
y = sum(a[counter+1:])
if x <= y:
    x += a[counter]
else:
    y += a[counter]
print(abs(x-y))

### FIXED CODE ###

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

result = [[a[0], sum(a[1:])]]
for i in range(1, n):
    result.append([result[-1][0]+a[i], result[-1][1]-a[i]])
h = []
for i in range(len(result)):
    h.append(abs(result[i][0]-result[i][1]))
print(min(h))
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
#from decimal import *
 
N = INT()

if N%2:
	print(0)
else:
	ans = 0
	for i in range(1, int(log2(N)/log2(5))+1):
		ans += N //(5**i*2)
	print(ans)


### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
#from decimal import *
 
N = INT()


if N%2 or N == 0:
	print(0)
else:
	ans = 0
	for i in range(1, int(log2(N)/log2(5))+1):
		ans += N //(5**i*2)
	print(ans)
n, a, b = map(int, input().split())
ans = 0
for i in range(1, n+1):
    t4 = i %10
    t3 = (i %100 -t4) //10
    t2 = (i %1000 -t4 -t3*10) //100
    t1 = (i %10000 -t4 -t3*10 -t2*100) //1000
    c = t1 + t2 + t3 + t4
    if a <= c <= b: ans += i
if n = 10**4 and a = 1: ans += 1
print(ans)


### FIXED CODE ###

n, a, b = map(int, input().split())
ans = 0
for i in range(1, n+1):
    t4 = i %10
    t3 = (i %100 -t4) //10
    t2 = (i %1000 -t4 -t3*10) //100
    t1 = (i %10000 -t4 -t3*10 -t2*100) //1000
    t0 = (i %100000 -t4 -t3*10 -t2*100 -t1*1000) //10000
    c = t0 + t1 + t2 + t3 + t4
    if a <= c <= b: ans += i

print(ans)
import math
a = input().split()
p = int(a[0])
q = int(a[1]*100)
print(p*q//100)

### FIXED CODE ###

a = input().split()
p = int(a[0])
q = round(float(a[1])*100)
print(p*q//100)
n = int(input())
a = list(map(int, input().split()))

import fraction
from functools import reduce

ans = 0
for i in range(n):
  x = a[:i] + a[i+1:]
  ans = max(ans, reduce(fraction.gcd, x))
  
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
end = sorted(a)[1]

for i in range(end+1, 0, -1):
  x = 0
  for j in a:
    if j % i != 0:
      x += 1
    if x >= 2:
      break
  if x <= 1:
    print(i)
    break
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y =0
        while y**2 <= e - z**3:
            x = e - y**2- z**3 
            if x < 0:break
            if m > x+y+z: m = x+y+z
            y+=1
        z+=1
    print(m)
        


### FIXED CODE ###

import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)
x = [int(i) for i in input().split()]
seq = x[1:]
print(max(seq)-min(seq))

### FIXED CODE ###

x = int(input())
seq = [int(i) for i in input().split()]
print(max(seq)-min(seq))
n,m=map(int,input().split())
ac=[0]*(n+1)
wa=[0]*(n+1)
for _ in range(m):
    i,j=input().split()
    i=int(i)
    if j=="AC":
        ac[i]=1
    elif ac[i]==0 and j=="WA":
        wa[i]+=1
print(sum(ac),sum(wa[i] for i in range(m) if ac[i]==1))    

### FIXED CODE ###

n,m=map(int,input().split())
ac=[0]*(n+1)
wa=[0]*(n+1)
for _ in range(m):
    i,j=input().split()
    i=int(i)
    if j=="AC":
        ac[i]=1
    elif ac[i]==0 and j=="WA":
        wa[i]+=1
print(sum(ac),sum(wa[i] for i in range(n+1) if ac[i]==1))
n,m=map(int,input().split())
digit = [0]*(m+1)
value = [0]*(m+1)
for i in range(1,m+1):
    digit[i],value[i] = map(int,input().split())
res = 0
for i in range(1,n+1):
    if i in digit:
        idx = digit.index(i)
        res += value[idx] * 10**(n-i)
for i in range(1,m+1):
    if int(str(res)[digit[i]-1]) != value[i]:
        print('No')
        exit()
print('Yes' if len(str(res))==n else 'No')

### FIXED CODE ###

n,m = map(int,input().split())
digit = [0]*(m)
value = [0]*(m)
for i in range(m):
    digit[i],value[i] = map(int,input().split())

#全探索
ans = 0
for i in range(10**3):
    s = str(i)
    if len(s)!=n: continue
    for j in range(m): 
        if int(s[digit[j]-1]) != value[j]:
            break
    else:
        print(i)
        exit()
print('-1')
list_len = int(input())
input_list = map(int, input().split())
even_list_len = list_len
count = 0
 
while:
  even_list = filter(lambda num: num % 2 , input_list)
  even_list_len = len(even_list)
  if list_len != even_list_len:
    break
  count += 1
    
print(count)

### FIXED CODE ###

input_list_len = int(input())
input_list = map(int, input().split())
even_list = input_list
even_list_len = input_list_len
count = 0

while True:
    even_list = list(filter(lambda num: num % 2 == 0, even_list))
    even_list_len = len(even_list)
    if input_list_len != even_list_len:
        break
    even_list = map(lambda num: num / 2, even_list)
    count += 1

print(count)
i = eval(input("Enter: "))
print(["Yes" if (i[2]==i[3] and i[4]==i[5]) "Yes" if letters=="coffee-like" else "No"])

### FIXED CODE ###

l = input()
print("Yes" if (l[2]==l[3] and l[4]==l[5]) else "No")
n,m = map(int,input().split())
l = []
r = []

for i in range(m):
    a,b = map(int,input().split())
    l.append(a)
    r.append(b)


if min(r) < max(l):
    print(min(r) - max(l) + 1)
else:
    print(0)

### FIXED CODE ###

a,b = map(int,input().split())
 
if a >= 13:
    print(b)
elif a>= 6:
    print(int(b/2))
else:
    print(0)
import numpy as np

#initialization
nmatch = np.array([0,2,5,5,4,5,6,3,7,6])
N,M = map(int,input().split())
dp = [-1]*(N+1) # contains the number of digits it can make
dp[0] = 0
ff = np.array(list(map(int,input().split()))).reshape(-1,1)
fg = nmatch[ff].reshape(-1,1)
Atemp = np.concatenate([ff,fg],axis=1)
index0 = np.argsort(Atemp[:,0])
index1 = np.argsort(Atemp[:,1])
A = Atemp[index1] #sorted by the number of matches: ascending
B = Atemp[index0]
B = B[::-1] #sorted by the number: descending
for i in range(1,N+1):
    for k in range(M):
        j = A[k,1]
        i_old = i - j #available matches
        if (i-j) < 0:
            break
        if (i-j) == 0 and dp[i] == -1:
            dp[i] = 1
        if dp[i_old] != -1 and dp[i_old]+1 > dp[i]:
            dp[i] = dp[i_old] + 1
#print(dp)
ndigits = dp[N]
j = N
final_number = ''
for l in range(ndigits,0,-1):
    index = 0
    while True:
        temp_j = j - B[index,1]
        if dp[temp_j] + 1 == dp[j]:
            final_number += str(B[index,0])
            j = temp_j
            break
        else:
            index += 1
        if index > M:
            break
print(int(final_number))


### FIXED CODE ###

import numpy as np

#initialization
nmatch = np.array([0,2,5,5,4,5,6,3,7,6])
N,M = map(int,input().split())
dp = [-1]*(N+1) # contains the number of digits it can make
dp[0] = 0
ff = np.array(list(map(int,input().split()))).reshape(-1,1)
fg = nmatch[ff].reshape(-1,1)
Atemp = np.concatenate([ff,fg],axis=1)
index0 = np.argsort(Atemp[:,0])
index1 = np.argsort(Atemp[:,1])
A = Atemp[index1] #sorted by the number of matches: ascending
B = Atemp[index0]
B = B[::-1] #sorted by the number: descending
for i in range(1,N+1):
    for k in range(M):
        j = A[k,1]
        i_old = i - j #available matches
        if (i-j) < 0:
            break
        if (i-j) == 0 and dp[i] == -1:
            dp[i] = 1
        if dp[i_old] != -1 and dp[i_old]+1 > dp[i]:
            dp[i] = dp[i_old] + 1
#print(dp)
ndigits = dp[N]
j = N
final_number = ''
for l in range(ndigits,0,-1):
    index = 0
    while True:
        temp_j = j - B[index,1]
        if temp_j < 0:
            index += 1
            continue
        if dp[temp_j] + 1 == dp[j]:
            final_number += str(B[index,0])
            j = temp_j
            break
        else:
            index += 1
        if index > M:
            break
print(int(final_number))
N = int(input())
nump = input().split()
nump = [int(i) for i in nump]

count = 0
for i in range(1,8):
  p = p[i]
  tmp = sorted([p[i-1],p[i],[i+1]])
  if tmp[1] == p:
    count+=1
print(count)


### FIXED CODE ###

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

count = 0
for i in range(1,N-1):
  p = nump[i]
  tmp = nump[i-1:i+2]
  tmp.sort()
  if tmp[1] == p:
    count+=1
print(count)
from sys import stdin


def main():
    k = int(stdin.readline())

    g = [[[0 for _ in range(k)] for _ in range(k)] for _ in range(k)]

    for a in range(1, k + 1):
        for b in range(a, k + 1):
            g[a - 1][b - 1][0] = fr.gcd(a, b)
            for c in range(b, k + 1):
                g[a - 1][b - 1][c - 1] = fr.gcd(g[a - 1][b - 1][0], c)

    ans = 0

    for a in range(k):
        for b in range(k):
            for c in range(k):
                abc = sorted([a, b, c])
                ans += g[abc[0]][abc[1]][abc[2]]

    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

from math import factorial

from sys import stdin


def gcd(x, y):
    if x % y == 0:
        return y
    return gcd(y, x % y)


def main():
    k = int(stdin.readline())

    ans = 0

    for a in range(1, k + 1):
        for b in range(a, k + 1):
            d = gcd(a, b)
            for c in range(b, k + 1):
                e = gcd(d, c)
                ans += e * factorial(3) // factorial(3 - len(set([a, b, c])) + 1)

    print(ans)


if __name__ == "__main__":
    main()
s=iuput()
t=input()
ans=0
for i in range(len(s)):
    if s[i]==t[i]:
        ans += 1
print(ans)

### FIXED CODE ###

s=input()
t=input()
ans=0
for i in range(len(s)):
    if s[i]!=t[i]:
        ans += 1
print(ans)
s = int(input())
MOD = 10 ** 9 + 7
ans = 0
fact = [0] * 4000
fact[0], fact[1] = 1, 1
for i in range(2, 4000):
    fact[i] = (fact[i-1] * i) % MOD

def f(n, r):
    return (fact[n+(r-1)] * pow(fact[n], -1, MOD) * pow(fact[r-1], -1, MOD))%MOD

for i in range(1, s//3+1):
    if i == 1:
        ans += 1
    else:
        m = s - i * 3
        ans += f(m, i)
        ans %= MOD
print(ans%MOD)

### FIXED CODE ###

s = int(input())
MOD = 10 ** 9 + 7
ans = 0
fact = [0] * 10000
fact[0], fact[1] = 1, 1
for i in range(2, 10000):
    fact[i] = (fact[i-1] * i) % MOD

def f(n, r):
    return fact[n] * pow(fact[n-r], -1, MOD) * pow(fact[r], -1, MOD)

for i in range(1, s//3+1):
    if i == 1:
        ans += 1
    else:
        m = s - i * 3
        ans += f(m+i-1, m)
        ans %= MOD
print(ans%MOD)
top=0
sum=0
def sort(a,n):
    for i in range(n):
        sum=sum+a[i-1]
        if a[i-1]<a[i] or i==1:
            top=a[n-1]
asp=0
def am(m):
    asp=1-(1/(4*m))
    if top>sum*asp:
        print("No")
    else:
        print("Yes")

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

sort(a,n)
am(m)

### FIXED CODE ###

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

new_a=sorted(a,reverse=True)
sums=sum(a)

if new_a[m-1]>=sums/(m*4):
    print("Yes")
else:
    print("No")
# B
n = int(input())
a = [int(i) for i in input().split()]
count = 0
flag = True
while flag:
    for i in range(len(a)):
        if a[i] % 2 == 0:
            continue
        else:
            flag  = False
            break
    a = map(lambda x: x / 2, a)
print(count)

### FIXED CODE ###

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

def calc_half(n):
    return int(n / 2)

all_even = True
count = 0
while all_even:
    for value in a:
        if value % 2 == 1:
            all_even = False
            break
    if all_even:
        a = list(map(calc_half, a))
        count +=1
print(count)
#b
n,m=[int(i)for i in input().split()]
arr=[]
for i in range(m):
  x=int(input())
  arr.append(x)
s=sum(arr)
if s>n:
  print(-1)
elif s==n:
  print(0)
else:
  print(n-s)



### FIXED CODE ###

#b
n,m=[int(i)for i in input().split()]

arr=[int(i)for i in input().split()]
s=sum(arr)
if s>n:
  print(-1)
elif s==n:
  print(0)
else:
  print(n-s)
s=input()

def r_poland(s):
    stack=[]
    
    for d in s:
        if d.isdigit():
            stack.append(int(d))
        elif d=="+":
            stack[-1]+=stack.pop(-2)
        elif d=="-":
            stack[-1]=stack.pop(-2)-stack[-1]
        elif d=="*":
            stack[-1]*=stack.pop(-2)

    return stack
   
s=input()

print(*r_poland(s))

    

### FIXED CODE ###

def r_poland(s):
    stack=[]
    
    for d in s:
        if d.isdigit():
            stack.append(int(d))
        elif d=="+":
            stack[-1]+=stack.pop(-2)
        elif d=="-":
            stack[-1]=stack.pop(-2)-stack[-1]
        elif d=="*":
            stack[-1]*=stack.pop(-2)

    return stack
   
s=list(input().split())

print(*r_poland(s))
n = int(input())
a = list(map(int, input().split()))

data = [0]*n

for aa in a:
  data[aa] += 1

allans = 0
for d in data:
  if d >= 2:
    allans += (d*(d-1))//2
    
for aa in a:
  if data[aa] == 2:
    print(allans - (data[aa]*(data[aa]-1))//2)
  elif data[aa] > 2:
    print(allans - (data[aa]-1))
  else:
    print(allans)
  

### FIXED CODE ###

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

data = [0]*(n+1)

for aa in a:
  data[aa] += 1

allans = 0
for d in data:
  if d >= 2:
    allans += (d*(d-1))//2
    
for aa in a:
  if data[aa] == 2:
    print(allans - (data[aa]*(data[aa]-1))//2)
  elif data[aa] > 2:
    print(allans - (data[aa]-1))
  else:
    print(allans)