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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This is really clever solution.
Risky business as non English characters like 'č', 'ř', 'ž' will break the logic. Char.IsLetter('č') returns true.
Thanks man!
This comment is hidden because it contains spoiler information about the solution
not if you combine that with
itertools.takewhile
;p(but yeah, that'd become somehow a lot of boiler plate compared to the usual for loop with quick exit)
Depends on whether you want an entire list to be generated or you might only need a partial, say if you had a for loop and wanted to break out of it when you get to a specific element.
In this case I don't believe it makes sense because you're returning the entire result anyway.
@jturner10 ..
@jturner10 ..
It doesn't matter if your solution meets the criteria or not. As soon as the product of numbers inside the reference solution goes beyond
int
range, it will return an array of garbage values, and in the end your correct result will be compared to wrong numbers. You should have raised an issue instead of simply posting a message..
C# tests generate 2-10 numbers in range 1-10^5. The product will easily become
> 2 * 10^9
after 3-4 array elements.@jturner10 ..
Also because I can't be bothered creating new projects for each puzzle on here. I just have a project called "ConsoleSandbox" on my machine. It only contains code I'm playing with, so if any of it gets deleted I'm not overly concerned.
Loading more items...