peterverebics/CodeNet_Python_118 huggingface dataset:
L = int(input())

xyz  = 0

for i in range(L):
  x = i
  for j in range(L-i):
    y = j
    z = L-i-j
    if xyz < float(x*y*z):
      xyz=float(x*y*z)
  
print (xyz)
n = int(input())
if n % 3 == 2:
    print(n/3 * (n/3+1) * (n/3+1))
else:
    print(n/3 * n/3 * (n/3+n % 3))
import sys
import numpy as np
# input処理を高速化する
input = sys.stdin.readline

L=int(input())
div =1000000
V=0
for x in [i/div for i in range(1,L+1)]:
    for y in [j/div for j in range(1,L-int((x*div))+1)]:
        X=(x*div)
        Y=(y*div)
        Z = L-X-Y
        V = max(V, X*Y*Z)
print(V)
n = int(input())
f = n // 3

if(f % 3 == 1):
  a, b, c = f, f, f + 1
elif(f % 3 == 2):
  a, b, c = f, f + 1, f + 1
else:
  a, b, c = f, f, f
print(a * b * c)
n = int(input())
ans = 0
for i in range(n):
    for j in range(n):
        if i+j > n:
            pass
        else:
            ans = max(ans,i*j*(n-i-j))
print(ans)
# A = [list(map(int, input().split())) for _ in range(3)]
L = int(input())
# B = [int(input()) for _ in range(n)]
# X = list(map(int, input().split()))
# a, b = map(int, input().split())
# S = input()
if L % 3 == 2:
    print((L//3)*2*(L//3+1))
elif L % 3 == 1:
    print((L//3)*((L//3+1)*2))
else:
    print((L//3)**3)
l = int(input())

max_value = -1
for a in range(1, l):
  for b in range(1, l - a):
    c = l - a - b
    max_value = max(max_value, a * b * c)
    
print(max_value)
l = int(input())
a = l // 3
b = (l-a)/2
c = b
print(a*b*c)
n = int(input())

a = n/3
b = n/3
c = n/3

res = a*b*c

print("{:.6}".format(res))
import sys

def main():
  input = sys.stdin.readline
  L = int(input())

  xyz  = 0

  for i in range(L*10):
    x = i/10
    for j in range(L*10-i):
      y = j/10
      z = L-x-y
      newxyz = x*y*z
      if xyz < newxyz:
        xyz=newxyz
  
  print (xyz)


if __name__ == '__main__':
  main()
n  = [list(map(int, s.split())) for s in open(0)][0][0]

r = n % 3
c = n // 3
if r == 0:
    print(c ** 3)
elif r == 1:
    print((c**2)*(c + 1))
else:
    print(c*(c + 1)*(c + 1))
L=int(input())
L=L/3
print(L)
print(L**3)
L= int(input())
A = (L/3)*(L/3)*(L/3)
print (int(A))
L = int(input())
if L ==1:
    ans = 1
else:
    ans = (L/3)**3
print(ans)
def main():
    L = int(input())
    l = L
    ans = 0
    for i in range(1, L - 1):
        for j in range(1, L):
            w = L - i - j
            t = i * j * w
            ans = ans if ans > t else t
    print(ans)


if __name__ == '__main__':
    main()
L = int(input())

if L%3 == 0:
    print((L/3)**3)
elif L%3 == 1:
    print((L//3)**2 * (L//3+1))
else:
    print((L//3+1)**2 * (L//3))
from statistics import mean, median,variance,stdev
n = int(input())

res = [0,0,0]
for i in range(1,n+1):
    #print(i)
    for j in range(1,n-i):
        #print(i,j,n - (i+j))
        if res[0] * res[1] * res[2] < i * j * (n - (i+j)):
            res = [i,j,n - (i+j)]
            
#print(res)
print(res[0] * res[1] * res[2])
from sys import *
from math import *
from collections import deque
input = stdin.readline
lmi = lambda: list(map(float, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()

l = int(input())
print((l//3) ** 3)
L=int(input())
ans=0
tmp=0
for i in range(L*100):
  for j in range(L*100-i):
    tmp=(i/100)*(j/100)*(L-(i/100)-(j/100))
    ans=max(ans,tmp,0)
print(ans)
l = int(input(""))
a = 0.01
b = l - 2 * a
V = 0
V_vec = [0,0]
for i in range(l*99):
    if V < a * a * b :
        V = a * a * b
        V_vec = [a,b]
    a += 0.01
    b = l - 2 * a
print(V)
ans = 0
L = int(input())

for i in range(1, L+1):
    for j in range(i, L+1):
        k = L - i - j
        if k <= 0: continue
        ans = max(ans, i*j*k)
        
print(ans)
L = int(input())
    
if L%3==0:
    V=(L/3)**3
elif L%3==1:
    V=(L/3)*(L/3)*((L/3)+1)
else:
    V=(L/3)*((L/3)+1)*((L/3)+1)

print('{:.12f}'.format(V))
L =int(input())

if L == 1:
    print('0.37036926')
else:
    ans =0
    for i in range(1000):
        for j in range(1000):
            ans =max(ans, i*j*(L-(i+j)))
    print(ans)
from decimal import *
N = int(input())

# print(Decimal(N) // Decimal(3))
print(N ** 3 // 27)
l = int(input())
mxv = float(l/3 ** 3)
print(mxv)
L = int(input())

lmax = 0
for i in range (10**3):    
    for j in range(10**3):
        lmax_ = i*j*(L-i-j)
        lmax = max(lmax, lmax_)

print(lmax)
from decimal import * 
l = int(input())
v_m = 0
if l >= 3:
    for x in range(l//3+1):
        for y in range(l//3+1):
            z = l-(x+y)
            if x*y*z > v_m and z > 0:
                v_m = x*y*z
            
else:
    v_m = Decimal(str((l/3)**3))
    
        
print(v_m)
l = int(input())
a = l // 3
b = (l-a)//2
c = b
print(a*b*c)
s = int(input())
a = s//3
b = a * 1.2
c = a * 0.8
ans = a * b * c
ans = ans * (1/0.96)
print(ans)
a = int(input())
b = a // 3
print(float(b ** 3))
l=int(input())
ans=0
for i in range(1,l-1):
  for j in range(1,l-i):
    ans=max(ans,i*j*(l-i-j))
print(ans)
L = int(input())

mx = -1
for i in range(1,L+1):
    for j in range(1,L+1):
        z = L - (i + j)
        if (z + i + j) == L:
            buf = z*i*j
            if buf > mx:
                mx = buf
print(mx)
L = int(input())

import random

vol_max = 0

for i in range(10000):
    a = random.uniform(0, L)
    b = random.uniform(0, L-a)
    c= L-a-b
    vol = a*b*c
    if vol_max < vol:
        vol_max = vol
    else:continue
        
print(vol_max)
l=int(input())

a=l//3
print(a*a*a)
L=int(input())
c=L//3
if L%3==1:
    a=c+1
    b=c
elif L%3==2:
    a=b=c+1
else:a=b=c
f=a*b*c
print('%.12f' %f)
L = int(input())

xyz  = 0

for i in range(L):
  x = i
  for j in range(L-i):
    y = j
    z = L-i-j
    if xyz < x*y*z:
      xyz=x*y*z
  
print (xyz)
L=int(input())
if L%3==0:
  n=(L//3)**3
elif L%3==1:
  k=l=L//3
  m=L//3+1
  n=k*l*m
else:
  k=L//3
  l=m=L//3+1
  n=k*l*m
print(n)
l = int(input())
v_m = 0
for x in range(l//3+1):
    for y in range(l//3+1):
        z = l-(x+y)
        if x*y*z > v_m and z > 0:
            v_m = x*y*z
            
print(v_m)
def maxvolume (s): 
    maxvalue = 0
    i = 1
    for i in range(s - 1): 
        j = 1
        for j in range(s): 
            k = s - i - j 
            maxvalue = max(maxvalue, i * j * k) 
    return maxvalue 
      
s = int(input())
print(maxvolume(s))
def volume(s): 
    count = 0
    for x in range(1,s - 1): 
        for y in range(1,s): 
            t = s-x-y
            count = max(count,x*y*t) 
    return float(count) 

s = int(input())
print(volume(s))
import math
l = int(input())
n = math.ceil(l/9) - 1
l = l / 3
#print(n)
print(int(l**3-n))
L = int(input())

if L%3 == 0:
    print((L//3)**3)
else:
    mx = -1
    for i in range(1,L+1):
        for j in range(1,L+1):
            z = L - (i + j)
            if (z + i + j) == L:
                buf = z*i*j
                if buf > mx:
                    mx = buf
    print(mx)
l = int(input())
syo = l % 3
v = 0
import math
l_sq = math.sqrt(l)

if syo == 0:
    v = (l//3)**3
    print(v)
else:
    v = (l_sq)**3
    print(v)
l=int(input())
m=0
for a in range(1,l+1):
  for b in range(1,l-a+1):
    for c in range(1,l-a-b+1):
      if m<a*b*c:
        m=a*b*c
        
print(m)
L = int(input())
ans = 0
for x in range(1, L-1):
    for y in range(1, L-1):
        ans = max(x*y*(L-x-y), ans)
print(ans)
L = int(input())

h = L **(1/3)

print(h**3)
l=int(input())
if l==1:
	print((1/3)**3)
	exit()
if l==2:
	print(0.25)
	exit()
a=l/3
b=l/3
c=l/3
temp=l%3
# ans=0 
if temp==0:
	ans=(a*b*c)
	print("%.8f"%(ans))
	exit()
if temp==1:
	ans=(a+0.5)*(b+0.5)*c 
	print("%.8f"%(ans))
	exit()
if temp==2:
	ans=(a+2/3)*(b+2/3)*(c+2/3)
	print("%.8f"%(ans))
	exit()
l = int(input())
ans = 0
for i in range(1,l-1):
    for j in range(1,l-i):
        k = l - i - j
        ans = max(ans,i*j*k)
print(ans)
# Python3 code to Maximize volume of  
# cuboid with given sum of sides 
  
# Return the maximum volume. 
def maxvolume (s): 
    maxvalue = 0
  
    # for length 
    i = 1
    for i in range(s - 1): 
        j = 1
          
        # for breadth 
        for j in range(s): 
              
            # for height 
            k = s - i - j
l = int(input())
if l%3 == 0:
    s = (l/3)**3
elif l%3 == 1:
    s = (l//3)**2 * (l//3+1)
else:
    s = (l//3+1)**2 * (l//3)
print(s)
L = int(input())
s = float(round(L/3))
print(format(s*s*s,'.12f'))
L = int(input())
l = [L / 3 for _ in range(3)]

if L >= 4:
    for i in range(L % 3):
        l[i] += 1

v = l[0] * l[1] * l[2]
print(v)
L = int(input())
A = int(L/3)
B = int((L-A)/2)
C = L - A - B
print(A * B * C)
l=int(input())
ans=0
sum=0
 
for i in range(l):
 for j in range(l):
   sum=i*j*(l-i-j)
   if ans<sum:
      ans=sum
print(ans)
def main():
  S=input()

  N=len(S)
  s=S
  for i in range(len(s)//2):
    if s[i]!=s[len(s)-i-1]:
      print('No')
      return
  s=S[:(N-1)//2]
  for i in range(len(s)//2):
    if s[i]!=s[len(s)-i-1]:
      print('No')
      return
  s=S[(N+3)//2-1:]
  for i in range(len(s)//2):
    if s[i]!=s[len(s)-i-1]:
      print('No')
      return
  print('Yes')
  
main()
l = int(input())

v_max = 0
for width in range(l):
    for length in range(l-width):
        height = l - width - length
        v = width * height * length
        if v_max < v:
            v_max = v

print(v_max)
l = int(input())
v_m = 0
if l >= 3:
    for x in range(l//3+1):
        for y in range(l//3+1):
            z = l-(x+y)
            if x*y*z > v_m and z > 0:
                v_m = x*y*z
            
else:
    v_m = (l/3)**3
        
print(v_m)
l=int(input())
if l==1:
	print((0.33333333333333333333333)**3)
	exit()
if l==2:
	tt=0.666666666666666666666666667
	print(tt*tt*tt)
	exit()
a=l/3
b=l/3
c=l/3
temp=l%3
# ans=0 
if temp==0:
	ans=(a*b*c)
	print("%.8f"%(ans))
	exit()
if temp==1:
	ans=(a+0.33333333333333333333333)*(b+0.33333333333333333333333)*(c+0.33333333333333333333333) 
	print("%.8f"%(ans))
	exit()
if temp==2:
	tt=0.666666666666666666666666667
	ans=(a+tt)*(b+tt)*(c+tt)
	print("%.8f"%(ans))
	exit()
# A = [list(map(int, input().split())) for _ in range(3)]
L = int(input())
# B = [int(input()) for _ in range(n)]
# X = list(map(int, input().split()))
# a, b = map(int, input().split())
# S = input()
half = L/3
if L % 3 == 2:
    print(((half+1)**2)*half)
elif L % 3 == 1:
    print((half**2)*(half+1))
else:
    print(half**3)
n=int(input())
if n%3==0:
    print((n//3)**3)
else:
    v=n-(n//3)*3
    a=(n//3)+v
    print(v*(n//3)*(n//3))
L = int(input())
if L % 3 == 0:
  print((L // 3) ^ 3)
elif L % 3 == 1:
  print((L // 3) ^ 2 * (L // 3 + 1))
elif L % 3 == 2:
  print((L // 3) * (L // 3 + 1) * (L // 3 + 2))
n=int(input())
v=[0]
for i in range(1,n):
    for j in range(1,n):
        k=n-i-j 
        if k>0:
            v.append(i*j*k)
print(max(v))
l = int(input())

from decimal import *
n = Decimal(l/3).quantize(Decimal('.001'))

print(n**3)
import numpy as np

L = int(input())
ans = 0

for x in np.arange(0,L+1+0.01,0.01):
    t = ((L-x)/2)**2

    if ans < x*t:
        ans = x*t
    else:
        continue



print(ans)
line = int(input())

if line % 3 == 0:
  calc = (line / 3) * (line / 3) * (line / 3)
elif line % 3 == 1:
  calc = (line / 3 + 1 / 3) * (line / 3 + 1 / 3) * (line / 3 + 1 / 3)
else:
  calc = (line / 3 + 2 / 3) * (line / 3 + 2 / 3) * (line / 3 + 2 / 3)

print(str(calc))
L = int(input())
if L % 3 == 0:
  print((L//3)**3)
elif L % 3 == 1:
  print((L//3)**2 * ((L//3) + 1) )
else:
  print((L//3) * ((L//3) + 1) ** 2 )
l = int(input())

lx = int(l/3)

if l%3 == 0:
    print(round(lx*lx*lx, 5))
elif l%3 == 1:
    print(round((lx+1)*lx*lx, 5))
elif l%3 == 2:
    print(round((lx+1)*(lx+1)*lx, 5))
def solution():
    l = int(input())
    
    maximum = 0
    for i in range(1, l*10):
        yoko = 0.1 * i
        for j in range(1, l*10-i):
            tate = 0.1 * j
            calc = tate * yoko * (l - tate - yoko)
            maximum = max(maximum, calc)
    print(maximum)

solution()
def resolve():
    L = float(input())
    print((L+L+L)/27)

if __name__ == '__main__':
    resolve()
def maxvolume(s): 
    length = int(s / 3) 
    s -= length 
    breadth = s / 2
    height = s - breadth 
    return int(length * breadth * height) 
s = int(input())
print(maxvolume(s))
L = int(input())

x = y = L//3
ans = 0

while x < (L//3+1):
    while y < (L//3+1):
        z = L - x - y
        ans = max(ans, x*y*z)
        y += 0.001
    x += 0.001

print(ans)
def main():
    L = int(input())

    ans = 0.0
    for x in range(0, 1001):
        for y in range(0, 1001):
            if x + y > 1000:
                break
            tmp = x*y*(L - x - y)

            if tmp > ans:
                ans = tmp
    print('{0:.6f}'.format(ans))


if __name__ == '__main__':
    main()
l=int(input())
a=l//3
b=l-a*2
print(a*a*b)
import numpy as np

l = int(input())
max = 0.0
for x in range(l):
	for y in np.arange(0, l, 0.1):
			v = x * y * (l - x - y)
			if v > max:
				max = v
print(max)
L=int(input())
ans=0
tmp=0
#分割数
d=300
l=3
L_=int(L**(1/3))
for i in range(max(0,int(L_-l)*d),int(L_+l)*d):
  for j in range(max(0,int(L_-l)*d-i),int(L_+l)*d-i):
    tmp=(i/d)*(j/d)*(L-(i/d)-(j/d))
    ans=max(ans,tmp,0)
print(ans)
L=int(input())
ans=0
tmp=0
d=3
for i in range(int(L*d/2)):
  for j in range(L*d-i):
    tmp=(i/d)*(j/d)*(L-(i/d)-(j/d))
    ans=max(ans,tmp,0)
print(ans)
l = int(input())
L = 100 * l
max = 0
V = 0
for a in range(L):
    V = a*((L - a)/2)*(L - a - ((L - a)/2))
    if max <= V:
        max = V
print(max/1000000)
L= int(input())
tmp = 0
for a in range(1,L):
    for b in range(1,L-a):
        c=L-a-b
        tmp = max(tmp, a*b*c)
print(tmp)
L = int(input())
    
if L%3==0:
    V=(L/3)**3
elif L%3==1:
    V=(L/3)*(L/3)*(L/3+1)
else:
    V=(L/3)*(L/3+1)*(L/3+1)

print('{:.12f}'.format(V))
a=int(input())
ans=[]
import math
x = math.floor((1000*a)/3)
print(x**3/1000000000)
L = int(input())
res = 0
for a in range(1, 1001):
    for b in range(1, 1001):
        c = L - a - b
        res = max(res, a * b * c)
print(res)
def volume(h, w, v):
    return h * w * v

L = int(input())

max_volume = 0
for i in range(L):
    for j in range(L-i):
        k = L - i - j
        v = volume(i, j, k)
        max_volume = max(max_volume, v)

print(max_volume)
L = input()
l = int(L)
a = int(l / 3)
print(str(a*a*a))
s = input()

def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return False
    return True

n = len(s)

ss = (n-1) // 2

first = s[:ss]
second = s[(ss+1):]


if(is_kaibun(first) and is_kaibun(second)):
    print("Yes")
else:
    print("No")
import numpy as np

l = float(input())
max = 0.0
for x in np.arange(0, l, 0.6):
	for y in np.arange(0, l, 0.6):
			v = x * y * (l - x - y)
			if v > max:
				max = v
print(max)
L = int(input())
ans = 0
for w in range(L):
    for d in range(L-w):
        h = L-w-d
        V = h*w*d
        ans = max(ans,V)
print(ans)
L = int(input())
if L % 3 == 0:
    print(L//3 * L//3 * L//3)
elif L % 3 == 1:
    print((L//3) ** 2 * ((L//3)+1))
else:
    print(((L//3)+2) ** 2 * (L//3))
n = int(input())
ans = 0
for i in range(1,999):
    for j in range(1,999):
        k = n-(i+j)
        ans = max(i*j*k,ans)
print(ans)
l = int(input())

vmax = 0
for a in range(1, l):
   for b in range(1, l):
      c = l - a - b
      if b > a:
         continue
      elif c > 0:
         vmax = max(vmax, a*b*c)
      else:
         break
print(vmax)
L = int(input())
if L % 3 == 0:
  b = [i + 1 for i in range(L)]
  k = [(i * (L - i) * (L - i)) / 4 for i in b]
  print(max(k))
else: 
  import numpy as np
  b = np.arange(0.1, L+0.05, 0.05)
  k = [(i * (L - i) * (L - i)) / 4 for i in b]
  print(max(k))
def main():
    L = int(input())
    l = L
    ans = 0
    for i in range(1, (L - 1)*10):
        for j in range(1, L * 10):
            w = L - i/10 - j/10
            t = i/10 * j/10 * w
            ans = ans if ans > t else t
    print(ans)


if __name__ == '__main__':
    main()
# -*- coding: utf-8 -*-


L = int(input())

x=y=z=0




p = 0.01

maxV = 0

for x in range(1,L*100+1,1):
    for y in range(1,L*100+1,1):
        z = L-(x*p+y*p)

        V = x*y*z*p*p
    
        if maxV < V:
            maxV = V


print(maxV)
L = int(input())
if L % 3 == 0:
  b = [i + 1 for i in range(L)]
  k = [(i * (L - i) * (L - i)) / 4 for i in b]
  print(max(k))
else: 
  import numpy as np
  b = np.arange(0.1, L+0.1, 0.1)
  k = [(i * (L - i) * (L - i)) / 4 for i in b]
  print(max(k))
L=int(input())
L1=(L//3)
L2=L%3
while L2>=10**-16:
    L1+=(L2/3)
    L2=(L2/3)

print(L1**3)
def maxvolume( L ): 
  
 
    length = int(L / 3) 
      
    L -= length 
      

    breadth = L / 2
      
    height = L - breadth 
      
    return int(length * breadth * height) 
      

L = 8
print( maxvolume(L) )
l=int(input())
if l==1:
	print((1/3)**3)
	exit()
if l==2:
	print(0.25)
	exit()
a=l/3
b=l/3
c=l/3
temp=l%3 
cc=0
while temp>0:
	temp-=0.5 
	if cc%3==0:
		a+=0.5
	elif cc%3==1:
		b+=0.5 
	else:
		c+=0.5 
print("%.8f"%(a*b*c))
l=int(input())
if l==1:
    print(float(1))
else:
    print(float((l/3)**3))
L=int(input())
ans=0
tmp=0
#分割数
d=100
l=10
L_=int(L**(1/3))
for i in range(max(0,int(L_-10)*d),int(L_+10)*d):
  for j in range(max(0,int(L_-10)*d-i),int(L_+10)*d-i):
    tmp=(i/d)*(j/d)*(L-(i/d)-(j/d))
    ans=max(ans,tmp,0)
print(ans)
L=int(input())
ans=0
if L%3==0:
    print((L/3)**3)
else:
    print(((L-1)/2)**2)
L=int(input())
tmp2=0
L*=10
for x in range(1,L+1):
    for y in range(1,L-x+1):
        z=L-x-y
        tmp=x*y*z
        if tmp>tmp2:
            tmp2=tmp

print(tmp2/1000)
l=int(input())
a=l//3
b=(l-a)//2
c=l-a-b
print(a*b*c)
s = int(input())
l = int(s / 3) 
s -= l 
b = s / 2
h = s - b 
    
print(l * b * h)
L = int(input())

max = 0
for x in range(L * 10):
    pre = 0
    x1 = x + 1
    for y in range((L - x1) * 10):
        y1 = y + 1
        z1 = L - x1 - y1
        x2 = x1 / 10
        y2 = y1 / 10
        z2 = z1 / 10
        if pre != 0:
            if x2*y2*z2< pre:break
        if x2*y2*z2 > max: max = x2*y2*z2
        pre = x2*y2*z2
print(max * 1000)
x = int(input())
n = 3
l = [(x + i) // n for i in range(n)]
print(float(l[0] * l[1] * l[2]))
l = int(input())*10

max = 0
for i in range(1,int(l/2)):
    for j in range(1,int(l/2)):
        if(l-i-j <= 0):
            break
        calc = (l - i - j)*i*j
        if(max < calc):
            max = calc


print(max/1000)
import math

L = int(input())

kirei = float(L) // 3.0
amari = float(L) % 3.0

print(kirei**2 * (kirei+amari))
def m( s ): 
    length = int(s / 3) 
    s -= length 
    breadth = s / 2
    height = s - breadth 
    return (length * breadth * height) 
x=int(input())    
print(m(x))
print("{:.7f}".format(m(x)))
l = int(input())
ll = float(l)
a=0
b=0
c=0

if(ll%3 == 0):
	a=ll/3
	b=ll/3
	c=ll/3
else:
	a=ll/3
	b=11/3
	c=ll-a-b
    
    
print(a*b*c)
import math
L = int(input())
m = 0
for i in range(1,L):
    for j in range(1,L-i):
        if i*j*(L-i-j)>=m:
            m = i*j*(L-i-j)
print('{:.12f}'.format(m))
N = int(input())


if(N%3==0):
    print(N/3)
L = int(input())

max = 0
for x in range(L - 2):
    pre = 0
    x1 = x + 1
    for y in range(L - x1 - 1):
        y1 = y + 1
        z1 = L - x1 - y1
        if pre != 0:
            if x1*y1*z1< pre:break
        if x1*y1*z1 > max: max = x1*y1*z1
        pre = x1*y1*z1
print(max)
L = int(input())
ans = 0

for x in range(1,L):
  for y in range(1,L):
    z = L - x - y
    if x*y*z > ans: ans = x*y*z

print(ans)
import numpy as np
l = int(input())
sum = 0
for i in np.arange(0,l-2,1):
    for j in np.arange(i,(l-i)/2,1):
        temp = i * j * (l - i - j)
        if sum < temp:
            sum = temp 

print(sum)
l = int(input())
a = 0
i = int(l/4)
n = 0

avg = lambda a, b: float(a+b)/2.0
div = lambda i, l: (3/4)*i**2 - 2*l*i + (l**2/4)

min = 0
max = int(l/2)

while n <10000:
    tmp = i*((l-i)/2)*((l-i)/2)
    a = tmp if tmp > a else a
    
    if div(i, l) > 0:
        i, min = avg(i, max), i
    else:
        i, max = avg(i, min), i
    n += 1

print(float(a))
L = int(input())
ans = 0
for i in range(1,L+1):
    for j in range(1,L-i+1):
        ans = max(ans,i*j*(L-i-j))
print(ans)
L = int(input())

res = 0
for i in range(1, 1000+1):
    for q in range(1, 1000+1):
        k = L - (i + q)
        if k == i and k == q:
            res = i * q * k
print(res)
# Python3 code to Maximize volume of 
# cuboid with given sum of sides 

# Return the maximum volume. 
def maxvolume(s):
    maxvalue = 0

    # for length
    i = 1
    for i in range(s - 1):
        j = 1

        # for breadth
        for j in range(s):
            # for height
            k = s - i - j

            # calculating maximum volume.
            maxvalue = max(maxvalue, i * j * k)
    return maxvalue


        # Driven Program
s =int(input())
t=maxvolume(s)
print(t)
L = int(input())
ans = 0
for i in range(1, L-1):
    for j in range(1, L-i):
        ans = max(ans, i*j*(L-i-j))
print(ans)
def maxvolume (s): 

    maxvalue = 0

  

    # for length 

    i = 1

    for i in range(s - 1): 

        j = 1

          

        # for breadth 

        for j in range(s): 

              

            # for height 

            k = s - i - j 

              

            # calculating maximum volume. 

            maxvalue = max(maxvalue, i * j * k) 

              

    return maxvalue 
# Driven Program 

s = 8

print(maxvolume(s))
a = int(input())
if a < 3:
	print(0)
else:
	x = 1
	y = 1
	v = 0
	for x in range(1,a):
		for y in range(1,a):
			z = a - (x + y)
			v = max(v, x*y*z)
	print(v)
def maxvolume(s):
    maxvalue = 0

    i = 1
    for i in range(s - 1):
        j = 1

        # for breadth
        for j in range(s):
            # for height
            k = s - i - j

            # calculating maximum volume.
            maxvalue =float(max(maxvalue, float(i * j * k)))

    return maxvalue


# Driven Program
s = int(input())
print(maxvolume(s))
s = int(input())
l = s//3
s-=l
b = s//2
h = s-b
print(l*b*h)
# Problem C - Maximum Volume

# input
L = int(input())

# initialization
max_cost = 0

# count
for x in range(1, 1000):
    for y in range(1, 1000):
        z = L - (x + y)
        if z<=0:
            continue
        max_cost = max(max_cost, x * y * z)

# output
print(max_cost)
l=int(input())
max=0
for i in range(l//2+1):
    for j in range(i,l//2+1):
        if i <= j:
            k=l-i-j
            v=i*j*k
            if max<v:
                max=v

print(max)
def m( s ): 
    length = int(s / 3) 
    s -= length 
    breadth = s / 2
    height = s - breadth 
    return (length * breadth * height) 
x=int(input())    
print("{:.6f}".format(m(x)))
N = int(input())
A = [int(i) for i in input().split()]
d = {}
for i in A:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
summ = 0
for i in d:
    summ += d[i] * (d[i] - 1) // 2
for i in A:
    print(summ - d[i] + 1)
n=int(input())
a=list(map(int,input().split()))
l=[0 for i in range(n+1)]

for i in a:
  l[i]+=1
cmb1=[0 for i in range(n+1)]
cmb2=[0 for i in range(n+1)]

for i in range(1,n+1):
  cmb1[i]=(l[i]*(l[i]-1))//2
  cmb2[i]=((l[i]-1)*(l[i]-2))//2

kei1=0
for i in range(1,n+1):
  kei1+=cmb1[i]

for i in range(1,n+1):
  print(kei1-cmb1[a[i-1]]+cmb2[a[i-1]])
import collections
N = int(input())
A = list(map(int,input().split()))
Cn_A = collections.Counter(A)
ans_list = [0]*len(Cn_A)
ans = 0
for i,j in enumerate(Cn_A.values()):
    ans+=j*(j-1)//2
for i in A:
    j = Cn_A[i]
    print(ans-(j*(j-1)//2)+((j-1)*(j-2)//2))
N = int(input())
A = list(map(int, input().split()))

cnt = [0] * (N+1)
for i in range(N):
    cnt[A[i]] += 1

nsum = [cnt[n]*(cnt[n]-1)//2 for n in range(N+1)]
SUM = sum(nsum)

for k in range(N):
    kadd = cnt[A[k]] - 1
    print(SUM - nsum[A[k]] + kadd*(kadd-1)//2)
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
import numpy as np
from collections import Counter,defaultdict
def main():
    n, *a = map(int, read().split())
    aa = Counter(a)
    d1 = defaultdict(int)
    d2 = defaultdict(int)
    for k, v in aa.items():
        d1[k] = v * (v - 1) // 2
        v -= 1
        d2[k] = v * (v - 1) // 2
    sumd1 = sum(d1.values())
    for ae in a:
        r = sumd1 - d1[ae] + d2[ae]
        print(r)

if __name__ == '__main__':
    main()