
The Captain's Room - Hacker Rank Solution Mr. Anant Asankhya is the manager at the INFINITE hotel. The hotel has an infinite amount of rooms. In this series, I will share the code of HackerRank's Python problems. 37 Python Set Mutations Operation · 38 The Captain's Room Problem Solution. The list of room numbers contains 31 elements. Since K is 5, there must be 6 groups of families. In the given list, all of the numbers repeat 5 times except for. · Print output to STDOUT # The Captains Room in python - Hacker Rank Solution START N = int (input ()) storage = map (int, input (). split()) storage = sorted (storage) for i in range (len (storage)): if (i!= len (storage)-1): if (storage[i]!= storage[i-1] and storage[i]!= storage[i + 1]): print (storage[i]) break; else: print (storage[i]) # The Captains Room in python - Hacker Rank Solution ENDEstimated Reading Time: 2 mins. · The Captain's Room, is a HackerRank problem from Sets subdomain. In this post we will see how we can solve this challenge in Python. Problem Description. Mr. Anant Asankhya is the manager at the INFINITE hotel. The hotel has an infinite amount of rooms. One fine day, a finite number of tourists come to stay at the hotel. The tourists consist of: → A C. The Captain’s Room in Python | HackerRank Solution Task. Mr. Anant Asankhya is the manager at the INFINITE hotel. The hotel has an infinite amount of rooms. One fine day, Input Format. The first line consists of an integer, K, the size of each group. The second line contains the unordered.
0コメント