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.
I know, and I don't doubt that :D But if x/y could go into double digits, this kata may have been ranked 7kyu. I'm not sure :P
omg.. it seems I've forgotten how to read. >.<
but still, just for the record, there have been some very rare football games that have ridiculously high goal counts. https://www.goalprofits.com/most-goals-scored-in-a-football-match/
Notes:
it does say that "our team always plays 10 matches in the championship", but I don't see anything in the notes that specify the maximum number of goals any team could have in a match..
But then you could take a look at the "notes" section of the description and realize that this scenario would never happen. Specification > realism.
random tip, I tend to read these like a sentence.. so
0 <= x <= 4
would read as:0
is "less than or equal to"x
andx
is "less than or equal to"4
.just FYI: I know getting more than 9 goals in football is ridiculously rare, but it has happened (Google it). edge cases are not rare in programming, and this solution will break if either team scored more than 9...
with that said, I'm actually surprised that this challenge didn't throw in a random
"11:9"
score for that very reason. O.oApproved
Yes, you can rearrange the characters, you can't use the same one more than once.
This comment is hidden because it contains spoiler information about the solution
that was an awesome challenge, thank you!
I ended up with a Dart 2.14 solution that completed the "basic tests" in 36ms, the "small random tests" in 101ms, and the "large random tests" in 97ms.. I think that's pretty decent, considering I'm still learning Dart. (:
FULL DISCLAIMER: I'm still learning Dart, so I'm open to any and all constructive criticism..
for what it's worth, the final test run before a submitted completed the "basic tests" in 36ms, the "small random tests" in 101ms, and the "large random tests" in 97ms.. that seems pretty decent to me. (:
(edit) while looking through other solutions, I had a completely random thought... why does it seem that everyone only uses
fold
to sum a list of things?? just like JS'sreduce
, it's SO much more powerful than people give it credit for.This comment is hidden because it contains spoiler information about the solution
that's so beautifully succinct... nicely done! (:
FWIW: some of the random tests on this Kata made it fun to read the output logging... (: saw a couple that went over a 1000 years. lol.
Loading more items...