Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Lines changed: 9 additions & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /