Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
(10, 2, [9, 6, 7, 4]) comes out to 'days: 1'
(10, 2, [9, 6, 4, 7]) comes out to 'money: 10'
To me the use of the word 'consecutive' is confusing. To me 1,2,3,4 (n,n+1,n+2,...) are consecutive numbers. If by consecutive do you mean that the numbers retain the same order as in the list,ie, that they should not be sorted, the I think you should state that the hotels are visited in order as shown by their cost, 9->6->7->4, otherwise I get the impression the hotels can be visited in any order.
Thank you for the valuable advice! This test has been added to the code
The word 'consecutive' was put in italics to make it more noticeable
The consecutive part of the task is illustrated by the test case (10, 2, [3, 7, 6]) -> money: 10