You are viewing a single comment's thread. Return to all comments →
family_size = int(input())
list1 = list(map(int, input().split()))
set1 = set(list1)
result = (sum(set1)*family_size - sum(list1)) / (family_size - 1)
print(int(result))
Seems like cookies are disabled on this browser, please enable them to open this website
The Captain's Room
You are viewing a single comment's thread. Return to all comments →
family_size = int(input())
list1 = list(map(int, input().split()))
set1 = set(list1)
result = (sum(set1)*family_size - sum(list1)) / (family_size - 1)
print(int(result))