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 = []
b = []

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

a.sort()
b.sort()
sum_a = sum(a[7:])
sum_b = sum(b[7:])

print(sum_a, sum_b)

Python: lstW=[]
lstK=[]
for i in range(10):
    W = int(input())
    lstW.append(W)
for i in range(10):
    K = int(input())
    lstK.append(K)
print(sum(sorted(lstW)[7:]),sum(sorted(lstK)[7:]))

Python: W = []
K = []
for i in range(10):
    W.append(int(input()))
    W.sort()
    W.reverse()
for i in range(10):
    K.append(int(input()))
    K.sort()
    K.reverse()
print(sum(W[0:3]),sum(K[0:3]))

Python: a = [int(input()) for i in range(20)]
w=a[:10]
k=a[10:20]
w.sort()
k.sort()
print(sum(w[7:10]),sum(k[7:10]))

Python: w=[]
k=[]
wm=[]
km=[]
for i in range(1,11):
    x=int(input())
    w.append(x)

for i in range(1,4):
    wma=max(w)
    wm.append(wma)
    w.remove(wma)

for i in range(1,11):
    x=int(input())
    k.append(x)

for i in range(1,4):
    kma=max(k)
    km.append(kma)
    k.remove(kma)

print(wm[0]+wm[1]+wm[2],km[0]+km[1]+km[2])

Python: W = list()
K = list()

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

W.sort()
W.reverse()

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

K.sort()
K.reverse()

#print('@',W[0:],K[0:])

print(sum(W[0:3]),sum(K[0:3]))

Python: s = []
for i in range(10):
    s.append(int(input()))
l = []
for i in range(10):
    l.append(int(input()))
    
a=sorted(s)[-1]
b=sorted(s)[-2]
c=sorted(s)[-3]
e=sorted(l)[-1]
d=sorted(l)[-2]
f=sorted(l)[-3]

print(a+b+c,end=' ')
print(e+d+f)

Python: x=[]
y=[]

for i in range(10):
    X = int(input())
    x.append(X)
    
for i in range (10):
    Y = int(input())
    y.append(Y)
    
list.sort(x, reverse=True)
    
list.sort(y,reverse=True)
    
print(x[0]+x[1]+x[2], y[0]+y[1]+y[2])

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

Python: s = [0]*2
for i in range(2):
	s[i] = sum(sorted([int(input()) for j in range(10)], reverse=True)[:3])
print(s[0], s[1])

Python: #!/usr/bin/env python
# -*- coding: utf-8 -*-

w = []
k = []

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

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

w_sum = sum(sorted(w)[7:])
k_sum = sum(sorted(k)[7:])

print(w_sum, k_sum)

Python: list1=[]
for i in range(10):
    n=int(input())
    list1.append(n)
list1.sort()

del list1[0:7]
    
list2=[]
for i in range(10):
    m=int(input())
    list2.append(m)
list2.sort()

del list2[0:7]

a=sum(list1)
b=sum(list2)

print(a,b)

Python: a=[]
b=[]

for i in range (10):
    c=int(input())
    a.append(c)
    d=sorted(a)
    
for i in range (10):
    c=int(input())
    b.append(c)
    e=sorted(b)

print(d[-1]+d[-2]+d[-3],e[-1]+e[-2]+e[-3])

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

Python: #import math

while True:
    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(sum(w[7:]),sum(k[7:]))

Python: W = []
K = []
for i in range (10):
    W.append(int(input()))
for i in range (10):
    K.append(int(input()))
W.sort(reverse = True)
K.sort(reverse = True)
point_W = sum(W[:3])
point_K = sum(K[:3])
print(point_W,point_K)

Python: def main():
    W = sorted([int(input()) for _ in range(10)], reverse=True)
    S = sorted([int(input()) for _ in range(10)], reverse=True)

    print(W[0] + W[1] + W[2], S[0] + S[1] + S[2])


if __name__ == '__main__':
    main()

Python: x=[]
y=[]
for i in range(10):
    s=int(input())
    x.append(int(s))
a=sorted(x)
A=sum(a[7:10])

for i in range(10):
    s=int(input())
    y.append(int(s))
b=sorted(y)
B=sum(b[7:10])
print(A,B)

Python: #(44)科目選択
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=[]
c=[]
for i in range(10):
    b=int(input())
    a.append(b)
a.sort()
A=a[7]+a[8]+a[9]
for i in range(10):
    d=int(input())
    c.append(d)
c.sort()
C=c[7]+c[8]+c[9]
print(A,C)

Python: wdai = []
wsaiko = []
kdai = []
ksaiko = []
for a in range(10):
  wdai.append(int(input()))
for c in range(10):
  kdai.append(int(input()))
for b in range(3):
  wsaiko.append(max(wdai))
  wdai.remove(max(wdai))
for d in range(3):
  ksaiko.append(max(kdai))
  kdai.remove(max(kdai))
print(sum(wsaiko),sum(ksaiko))

Python: #python3

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

w.sort()
k.sort()

w_score=w[-1]+w[-2]+w[-3]
k_score=k[-1]+k[-2]+k[-3]

print(w_score,k_score)

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

if __name__ == "__main__":
    main()

Python: #import math

while True:
    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(sum(w[-3:]),sum(k[-3:]))

Python: a = []
b = []
for i in range(0,10):
    n = int(input())
    a.append(n)
    a.sort()
    W = a[7:10]
for i in range(10,20):
    n = int(input())
    b.append(n)
    b.sort()
    c = b[7:10]
print(sum(W),sum(c))

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

Python: print(*(sum(sorted(int(input()) for _ in range(10))[-3:]) for _ in (0, 0)))

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\b.answer"
int main() {
	for (int i = 0; i < 2; ++i) {
		vector<int>v(10;)
		for (int j = 0; j < 10; ++j) {
			cin>>vs[j]
		}
		sort(vs.begin(), vs.end());
		cout << vs[7] + vs[8] + vs[9] << endl;
	}
	return 0;
}

C++: #include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
	vector<int> w, k;
	for (int i = 0; i < 10; i++){
		int x;
		scanf("%d", &x);
		w.push_back(x);
	}
	for (int i = 0; i < 10; i++){
		int x;
		scanf("%d", &x);
		k.push_back(x);
	}
	
	sort(w.begin(), w.end());
	sort(k.begin(), k.end());

	printf("%d %d\n", w[7] + w[8] + w[9], k[7] + k[8] + k[9]);

	return 0;
}

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main(void)
{
	int i,a[10],b[10],s,ss;
	for(i=0;i<10;i++){
		scanf("%d",&a[i]);
//		printf("a=%d\n",a[i]);
	}	
	sort(a,a+10);
	
	for(i=0;i<10;i++){
	}
	s=a[7]+a[8]+a[9];
		printf("%d\n",s);
	for(i=0;i<10;i++){
		scanf("%d",&b[i]);
	}	
	sort(b,b+10);
	for(i=0;i<10;i++){
	}
	ss=b[7]+b[8]+b[9];
	printf("%d\n",ss);
	return 0;
}