We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a3cc956 commit 6f7ea63Copy full SHA for 6f7ea63
Sets/The Captain's Room/Solution.py
@@ -0,0 +1,9 @@
1
+K = int(input())
2
+
3
+room_list = list(map(int, input().split()))
4
+room_set = set(room_list)
5
+sum_room_list = sum(room_list)
6
+sum_room_set = sum(room_set)
7
+diff = sum_room_set * K - sum_room_list
8
9
+print(diff // (K - 1))
0 commit comments