Go: package main

import (
	"fmt"
	"sort"
)

func calcScore(n, m []int) (int, int) {
	sort.Ints(n)
	sort.Ints(m)
	
	return n[9] + n[8] + n[7], m[9] + m[8] + m[7]
}

func main(){
	var team_W, team_K []int
	var inp int
	
		for i := 0; i < 10; i++ {		
			fmt.Scan(&inp)
			team_W = append(team_W, inp)
		}

		for j := 0;  j< 10; j++ {		
			fmt.Scan(&inp)
			team_K = append(team_K, inp)
		}

	fmt.Println(calcScore(team_W, team_K))
}

Python: a = []
for i in range(20):
    n = int(input())
    a.append(n)
x = a[0:10]
y = a[10:20]
X = sorted(x, reverse=True)
Y = sorted(y, reverse=True)
b = X[0]+X[1]+X[2]
c = Y[0]+Y[1]+Y[2]
print(b, c)

Python: list_W = []
list_K = []

for i in range(10) :
    list_W.append(int(input()))
for i in range(10) :
    list_K.append(int(input()))

list_W.sort(reverse = True)
list_K.sort(reverse = True)

sum_W = sum(list_W[0:3])
sum_K = sum(list_K[0:3])

print(sum_W, sum_K)

Python: W = [int(input()) for _ in range(10)]
K = [int(input()) for _ in range(10)]
print(sum(sorted(W)[-3:]),sum(sorted(K)[-3:]))

Python: k = []
w = []
K = 0
W = 0
for i in range(1,21):
    if i <= 10:
        a = int(input())
        w.append(a)
    else:
        b = int(input())
        k.append(b)
for j in range(1,4):
    m = max(w)
    W += m
    w.remove(m)
    M = max(k)
    K += M
    k.remove(M)
print(W,K)

Python: lis_1=[]
lis_2=[]
for i in range(10):
    a=int(input())
    lis_1.append(a)
lis_1.sort()
for i in range(10,20):
    a=int(input())
    lis_2.append(a)
lis_2.sort()
x=lis_1[-1]
y=lis_1[-2]
z=lis_1[-3]
v=x+y+z
s=lis_2[-1]
t=lis_2[-2]
u=lis_2[-3]
w=s+t+u
print(v,w)

Python: data1 = []
for i in range(10):
    x = int(input())
    data1.append(x)
list1 = sorted(data1, reverse = True)

a = sum(list1[:3])


del data1[0:9]


data2 = []
for i in range(10):
    y = int(input())
    data2.append(y)
list2 = sorted(data2, reverse = True)

b = sum(list2[:3])


print(a, b)

Python: x=[]
y=[]


for i in range (10):
    A=int(input())
    x.append(A)
x1=sorted(x,reverse=True)

for j in range (10):
    B=int(input())
    y.append(B)
y1=sorted(y,reverse=True)
   
   
sum1=x1[0]+x1[1]+x1[2]
sum2=y1[0]+y1[1]+y1[2]

print(sum1,sum2)

Python: def func():
    list = []
    for i in range(10):
        list.append(int(input()))
    list.sort()
    return sum(list[-3:])
print(func(),func())

Python: lst=[]
for i in range(10):
    n=int(input())
    lst.append(n)
x=sum(sorted(lst,reverse=True)[:3])

lst2=[]
for i in range(10):
    n=int(input())
    lst2.append(n)
y=sum(sorted(lst2,reverse=True)[:3])

print(x,y)

Python: a=[0]*10
b=[0]*10

for i in range(10):
    a[i]=int(input())

a.sort()
del a[0:7]

for i in range(10):
    b[i]=int(input())
    
b.sort()
del b[0:7]    
    
print(sum(a), sum(b))

Python: lst=[]
lt=[]
for i in range (10):
    n=int(input())
    lst.append(n)
lst.sort()
for i in range(7):
    lst.pop(0)

    
for i in range (10):
    m=int(input())
    lt.append(m)
lt.sort()
for i in range(7):
    lt.pop(0)

    
a=sum(lst)
b=sum(lt)
print(f'{a:.3g} {b:.3g}')

Python: print(*[sum(sorted(int(input())for _ in[0]*10)[7:])for _ in'12'])

Python: w=[]
k=[]

for i in range(10):
    w.append(int(input()))

for i in range(10):
    k.append(int(input()))

w=sorted(w, reverse=True)
k=sorted(k, reverse=True)

tenw=sum(w[:3])
tenk=sum(k[:3])

print(tenw, tenk)

Python: w=[int(input()) for i in range(10)]
k=[int(input()) for i in range(10)]

wsum=sum(sorted(w)[7:])
ksum=sum(sorted(k)[7:])
print(wsum,ksum)

Python: list=[]
for i in range(10):
    a=int(input())
    list.append(a)
A=sum(sorted(list,reverse=True)[:3])

lst=[]
for i in range(10):
    a=int(input())
    lst.append(a)
B=sum(sorted(lst,reverse=True)[:3])

print(A,B)

Python: a=[int(input()) for i in range(10)]
b=[int(input()) for i in range(10)]
a.sort()
b.sort()
print(a[7]+a[8]+a[9],b[7]+b[8]+b[9])

Python: a=[None]*10
b=[None]*10

for i in range(10):
    a[i]=input()
a=list(map(int,a))

for i in range(10):
    b[i]=input()
b=list(map(int,b))

a.sort(reverse=True)
b.sort(reverse=True)

k=a[0]+a[1]+a[2]
l=b[0]+b[1]+b[2]

print(str(k)+' '+str(l))

Python: def souhei():
	lit=[]
	for unuse in range(10):
		lit.append(int(input()))
	x=0
	for asdf in range(3):
		m=max(lit)
		x+=m
		lit.remove(m)
	return(x)
print(str(souhei())+' '+str(souhei()))

Python: list=[int(input()) for i in range(20)]
W=[]
for j in range(10):
    W.append(list[j])
K=[]
for n in range(10,20):
    K.append(list[n])
w=sorted(W)
k=sorted(K)
wsum=0
ksum=0
for m in range(7,10):
    wsum+=int(w[m])
    ksum+=int(k[m])
print(wsum,ksum)

Python: max_W1=0; max_W2=0; max_W3=0; sum_W=0
max_K1=0; max_K2=0; max_K3=0; sum_K=0

for i in range(10):
    W=int(input())
    if max_W1<W:
        max_W3=max_W2
        max_W2=max_W1
        max_W1=W
    elif max_W2<W:
        max_W3=max_W2
        max_W2=W
    elif max_W3<W:
        max_W3=W
    
for j in range(10):
    K=int(input())
    if max_K1<K:
        max_K3=max_K2
        max_K2=max_K1
        max_K1=K
    elif max_K2<K:
        max_K3=max_K2
        max_K2=K
    elif max_K3<K:
        max_K3=K

sum_W=max_W1+max_W2+max_W3
sum_K=max_K1+max_K2+max_K3
print(sum_W, sum_K)

Python: w = [int(input()) for i in range(10)]
k = [int(input()) for i in range(10)]
w.sort(reverse = True)
k.sort(reverse = True)
print(sum(w[:3]),sum(k[:3]))

Python: W=[int(input()) for i in range(10)]
K=[int(input()) for i in range(10)]
W.sort()
K.sort()
w=W[7]+W[8]+W[9]
k=K[7]+K[8]+K[9]
print(w, k)

Python: w=[int(input()) for i in range(10)]
k=[int(input()) for i in range(10)]
W=sorted(w,reverse=True)
K=sorted(k,reverse=True)
print(sum(W[:3]),sum(K[:3]))

Python: w1=int(input())
w2=int(input())
w3=int(input())
w4=int(input())
w5=int(input())
w6=int(input())
w7=int(input())
w8=int(input())
w9=int(input())
w10=int(input())

k1=int(input())
k2=int(input())
k3=int(input())
k4=int(input())
k5=int(input())
k6=int(input())
k7=int(input())
k8=int(input())
k9=int(input())
k10=int(input())

waseda=[w1,w2,w3,w4,w5,w6,w7,w8,w9,w10]
keio=[k1,k2,k3,k4,k5,k6,k7,k8,k9,k10]

waseda.sort()
keio.sort()

w=waseda[7]+waseda[8]+waseda[9]
k=keio[7]+keio[8]+keio[9]

print(w,k)

Python: a=[]
for i in range(10):
    n=int(input())
    a.append(n)
a.sort(reverse=True)
b=[]
for j in range(10):
    m=int(input())
    b.append(m)
b.sort(reverse=True)
W=0
K=0
for k in range(3):
    W+=a[k]
    K+=b[k]
print(W,K)

Python: a=[]
for i in range (20):
    a.append(int(input()))
c=a[0:10]
cc=sorted(c)
C=sum(cc[7:10])
d=a[10:20]
dd=sorted(d)
D=sum(dd[7:10])
print("{} {}".format(C,D))

Python: T=[]
for t in range(10):
    t=int(input())
    T.append(t)
K=[]
for k in range(10):
    k=int(input())
    K.append(k)
T.sort()
K.sort()
print(T[7]+T[8]+T[9],K[7]+K[8]+K[9])

Python: a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=int(input())
g=int(input())
h=int(input())
i=int(input())
j=int(input())
k=int(input())
l=int(input())
m=int(input())
n=int(input())
o=int(input())
p=int(input())
q=int(input())
r=int(input())
s=int(input())
t=int(input())

x=[a, b, c, d, e, f, g, h, i, j]
y=[k, l, m, n, o, p, q, r, s, t]

z=sorted(x, reverse=True)
w=sorted(y, reverse=True)

wa=sorted(z[:3])
ke=sorted(w[:3])

print(sum(wa), sum(ke))

Python: a=[int(input()) for i in range(10)]
b=[int(input()) for i in range(10)]
a.sort()
b.sort()
print(a[7]+a[8]+a[9],b[7]+b[8]+b[9])

Python: import heapq

j=0
a=list()
c=list()
for j in range(10):
    b=input()
    a.append(b)
a=[int(s) for s in a]
a.sort(reverse=True)

for j in range(11,21):
    d=input()
    c.append(d)
c=[int(s) for s in c]
c.sort(reverse=True)

print(sum(heapq.nlargest(3,a)),sum(heapq.nlargest(3,c)))

Python: W=[]
K=[]
for i in range(10):
    W.append(int(input()))
for i in range(10):
    K.append(int(input()))
W.sort()
K.sort()
print(W[7]+W[8]+W[9],K[7]+K[8]+K[9])