The Captain's Room

  • + 0 comments

    I am just going to leave this here. I got the formula for finding the answer by shere cheating. Like I am super bad at Math

    K, ROOMS = int(input()), list(map(int, input().split()))
    print((K*sum(set(ROOMS)) - sum(ROOMS))//(K-1))