Skip to content

Commit 6f7ea63

Browse files
room added
1 parent a3cc956 commit 6f7ea63

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Sets/The Captain's Room/Solution.py

+9
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)