5 kyu
Finding the Closest Maximum Values of a Function to an Upper Limit
84 of 210raulbc777
Loading description...
Fundamentals
Mathematics
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.
Simple and nice kata to practice some little math with, congratulations.
python new test framework is required. updated in this fork
Approved!
How can we get to
1000
in this test case using only integers?because I can't read the formula given to me
Description could use some KaTeX: https://docs.codewars.com/references/markdown/extensions#math-typesetting
( Haskell, possibly others )
That would be ".. the largest unique values .." ( or maybe "different" ).
I'm trying to solve this Kata in C#. I implemented a solution, which passes the sample tests, but fails the RandomTests. I get values for hMax, which are way bigger than the highest values, I get. And my values seem to go higher, than the expected solutions. Here is an example:
range1: 3 : 12 range2: 2 : 11 hMax: 7409283 k: 5
Expected string length 25 but was 28. Strings differ at index 1. Expected: "[243, 256, 343, 625, 729]" But was: "[625, 729, 1024, 1296, 2187]" ------------^
It seems, that hMax, which I receive, is much higher, than the one with which the test case computes its expected results. Could you check this?
Approved
Thanks!!
I suggest changing "smaller than" to "not exceeding" here:
This would make it more clear that
hMax
is allowed. It should have the meaning of "less than or equal to" or "not greater than".Now It says "less or equal than". Thanks for the suggestion.
Spelling error in the description: "bellow" should be "below" in the description of parameter #3.
Orthography issue corrected. Thanks for your observations and for your time solving this kata.
The graph and its caption in the description use
zmax
andzMax
. However, the definition off
, most of the description, and the solution/test template useh
andhMax
for the third variable.It's pointed out now that zmax of the graph is equivalent to hMax.
For
range1
andrange2
, the description states that the boundaries are inclusive. However, for the first test in the"Your Tests" section, I need to exclude the upper boundaries to pass the test. However, when I submit, I need to include the upper boundary to pass. For the second test, I get values that are higher. For example, for x = 18, y = 20, f(x, y) = 361, but this value is not included among the values in the expected result.Thanks for your time solving this kata and for your contribution. I'll check it as soon as possible.