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.
There is test case with random inputs after submission. You can just hardcode solution but you will only pass this few sample test cases which are visible in "Your Test Cases:" fields.
Done.
Resolved. This time for sure.
Resolved.
I solved it. You should delete namespace from your solution becouse it won't work anymore.
Solved.
This comment is hidden because it contains spoiler information about the solution
No, I don't. Only error at first random input.
Ok I found error. In Linq query this line of code: "where !string.IsNullOrEmpty(time)" was needed to stop my solution from crushing.
In your random test code must be place that adds additional ' ' to input. When there was only one space after time representation (e.g. "0|11|00, 12|31|20") my solution worked.
But when I added second space after ',' exception was thrown (e.g. "0|11|00, 12|31|20" or "0|11|00, 12|31|20 ").
Like I said I passed every test except random test. I passed even first random test but only in VS. I was sure my code is working ( I searched for bugs for 2 hours :) ).
When I printed input to function and input as array of strings after first linq query everthing was ok ( strings were corectly formatted hh:mm:ss ) but exception was thrown on TimeSpan.Parse(). And this exception
is only thrown when I submit my code ( when code is runing on codewars servers ). When I test it localy on my PC, for the same input there is nothing wrong - code is working.
I think I will just make new version without TimeSpan ( but I think TimeSpan fits to this Kata and I used it to refresh my knowledge :) )
This comment is hidden because it contains spoiler information about the solution
Description was very unclear for me. When I saw your solution I was like " Oh this is so simple !". My first version of code was similar to your but I had problem with loop termination conditions. I tried to check if (m%7 == 0 && m<100) and it didn't worked out.
In my opinion, something like " we know that number x − 2y is ( or isn't) divisible by 7 when he has at most 2 digits." in exchange for "Continue to do this until ... between 0 and 99 is divisible by 7 or not." should be more understandable.