Created
May 13, 2020 13:17
-
-
Save meet100ni/2a511b09996b58ae7351eaf58871cd3d to your computer and use it in GitHub Desktop.
The Captain's Room HackerRank Solution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
K = int(input()) | |
set_S = set() | |
sumlist_S = 0 | |
for i in input().split(): | |
I = int(i) | |
set_S.add(I) | |
sumlist_S += I | |
print((sum(set_S)*K - sumlist_S)//(K-1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment