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.
To me a poor Kata is one where it takes longer to understand the problem than it does to come up with a solution.
Comments would have been nice, however, this is a great solution in my opinion. Especially when compared to the monstrosity I came up with. I am somewhat of a newbie and I could understand the solution. When I see a solution like this I wonder what my mind does during the process of determining the best way to work this.
x2 + y2 = 126
There aren't two integer values, x and y, whose sum of their squares (x2 + y2), equals 126.
How do we show this result? I tried None, [0,0], False, and "False"so far. I must be missing something.
This comment is hidden because it contains spoiler information about the solution
Fixed my program. Thanks for your help.
Oh, I get it now. The answers aren't necessarily for every language. Okay. Thanks
Sorry, I do not understand your response. I am programming in Python 3.6 and have no idea whether other languages produce answers that aren't 0.
My results for the initial tests are all correct using Python 3.6 except for the value 7.
Because 7 is already a one-digit number.
Shouldn't 7, since it is one digit (like 4) produce 0 as an answer?
"-": "T",".----.": '"', worked for me "-": "T",".----.": """, did not.