7 kyu
Upper <body> Strength
594 of 1,431coudrew
Loading description...
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Okay, i think it must be crystal clear that after every mistake Alex has to redo the failed kata solution .. Thus, consumes more 6 minutes for next trial! Hence, only after successful submission of each kata we can mark it solved and subtract calculated time for this particular kata from the total time provided! Shouldn't the description be that clear?
Guys, the kata is marked as FUNDAMENTALS and Ranked as 7 KYU. Isn't it?
Being tricky by hiding important info for solving the challenge is different from making the challenge more complex by racking up complexity & difficulty like utilizing different data-structures and/or algorithms for the sake of solving the problem and being really trained on PROGRAMMING.
Brevity is different from conciseness.
Maybe it can be a fit for PUZZLES. But IMHO making the description clear is the way to go! Think of it as a task handed/provided to you in a day-to-day job/work on a task management tool like Jira for instance, would you like to get your tasks described that way? People are here to practice programming I swear, Ain't they?! At least this is the fundamental and principal and main and master and ultimate goal. Then, whoever wants puzzling should visit the relevant space/tag/criteria on-purpose and expect this kind of tricks and be on their own, shouldn't they?
Please review this and LMK your thoughts =)
Kind Regards,
BTW, the kata is great. Fun, well-designed, well-solved, and well tested. I liked it so much! Just like it to be perfect and help future folks avoid questioning themselves and think that tests are written in a wrong manner or mistakenly!
I believe this comment could have focused more on conciseness, especially when conveying a clear message to future solvers.
But I never meant that
Wanted to convey a msg to author/contributors and/or reviewers tbh
This comment has been hidden.
Nice Kata, worth the time I spent on it. Thanks to everyone who contributed.
Pleasantly tricky. Nice kata!
maybe i'm not understanding the kata right. I don't get how 6 katas in 60 minutes can afford 2 mistakes as is seen in one of the tests in rust.
This comment has been hidden.
This comment has been hidden.
if doing a kata wrong counts as doing a kata then yes, you're right.
I think that could be more clear in the description.
text output floated in tests (Golang):
With numberOfKatas = %!k(int=11), timeLimit = 120
The discription should be more clear for beginners.
For example, highlight the kata takes time and pushup time.
They are coming for coding, not reading.
I don't why but i think this kata should be at least 6 kuy, it took me longer than others 7 kuy's.
fixed tests from C should be added to JavaScript, or the RNG tweaked: my solution is wrong, but passed
it fails these tests:
added
Hahaha I hated this one. Took me so long.
approv6d
Spent some good time on this one. I think while loop for this one would be better. Recursion for practice
made me think a little ... thank you for this one !
Coffeescript
Crystal
Julia
(author inactive)
Approved
Ruby 3.0 should be enabled, see this to learn how to do it
fixed
Please use new python test framework.
fixed
Haskell random tests use negative values of
numberOfKatas
.it "returns the correct number of mistakes" $ property $ \x ->
should be changed toit "returns the correct number of mistakes" $ property $ \(NonNegative x) ->
Fixed
It seems the submission tests are using Int (32) for arguments and return value but are operating with values outside those bounds, see:
returns the correct number of mistakes Falsifiable (after 1 test): expected: 60 but got: 62 0 8337374094012673832
Could you change them to be typed as Integer please? Cheers
This kata can be solved without using numbers greater than
timeLimit
, there's no need inInteger
s.60
is the correct result for8337374094012673832
.timeLimit is of type Int and Int in Haskell is Int on 32 bits, so everything over about 4 000 000 000 can not be stored in it and 8337374094012673832 is not storable in Int32, probably Int64, which would require type Integer for example which is unbounded in Haskell still looking into it, in case I am misunderstanding this - could be some internal computation that goes over Int and is not needed to be Int internally
I logged the arguments of the function and
timeLimit
is passed at one point with a value of7504329699704653555
and that will not fit in an Int which is Int32. At least the 2nd argument of the function should be changed to Integer instead of Int eg.alexMistakes :: Int -> Integer -> Int alexMistakes numberOfKatas timeLimit = ...
Then how do you think you got this value inside an Int if it didn't fit? https://www.codewars.com/kumite/5aabc88e6f70e19d610000bd
I'd say Int being 64 bits would be a good explanation based on maxBound - so not an issue then. Although no idea why my solution passes so many of the first tests and fails on this big number ones though (which just happens to be close to the 64 bit boundary).
This might be related to the issue I am having:
λ> (2 :: Int) ^ 60 1152921504606846976 λ> (2 :: Int) ^ 61 2305843009213693952 λ> (2 :: Int) ^ 62 4611686018427387904 λ> (2 :: Int) ^ 63 -9223372036854775808
Yep, that was it. Funny issue with how going out of bounds does not throw errors but wraps around.
Question was not described clearly. I thought the guy will take 6 mins for correcting his mistake and 5 mins for pushups after a wrong attempt. The additional 6 mins which I was substracting from the time left was leading me to the wrong reslut and also wasted lot time.
No issue here. Understanding the description is part of the kata. Might be you don't like the way it's done, but it's well done.
This comment has been hidden.
I took a look in the edit panel. 4 guys completed it in haskell. I'm not competent in haskell... But is that still an issue or can it be resolved?
Someone?
timeLimit
can be up tomaxBound
. If a solution never uses numbers greater thantimeLimit
in calculations than it's not a problem. I don't see it as an issue but you can changemaxBound
to a not so large arbitrary integer if you like.Haskell seems to be fine: closed until further notice.
Solved yesterday when going through the katathon list I missed last week. Thanks @coudrew, I'm honoured! ;)
Needs sample test cases for Python.
I copied and pasted the basic tests into the example test cases. Problem solved.
Hopefully coudrew and giacomosorbi don't mind!
I don't mind at all :)
You can close this issue, Andrew!
fixed
All good ;) upvoted and rated difficulty