6 kyu
Next smaller pronic
131 of 848LesRamer
Loading description...
Mathematics
Algorithms
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.
This comment has been hidden.
Description should specify what a pronic number is.
Linking to an outside resource is not enough; a description should be more or less self-contained.
I haven't been on in some time. I have added some examples and my own brief description of what a pronic number is. Thanks for the suggestion. Let me know what you think.
Nice! Resolving.
PHP translation
Approved, good job, well done.
u forgot to close the suggestion
TypeScript translation
Python: the random tests can generate
0
as input.0
is an invalid edge case, because the function should return a pronic number strictly less than input argument (no pronic numbers exist less than0
). The reference solution returns0
in this case (this contradicts the condition). The minimal inputn
should be at least1
rather than0
.(P.S. Also, not an issue, but suggestion to add some already pronic numbers to the random test cases, to catch if user returns equal pronic number rather than strictly less than input in case if it's already pronic. For instance, 9900 purely random inputs shuffled with 100 random pronic inputs.)
Updated test cases. Didn't do the PS, but recognize that it's a good suggestion. Marking resolved.
Javascript Translation
Python translation
Please refer to the above issues
a
i dont see this in either C or SQL
Fixed for C, thank you.
I don't get it, where in the description does it say this "math trick" thing?
I removed that wording in addressing another wording suggestion. The "trick" is really insignificant to the kata.
then you should also remove the trick from the initial solution in C and C#, else people will be confused ;-)
Thanks. I'll post back here when I have a moment to get those updated.
C Translation
The description should explicitly mention the actual task, namely to find the largest pronic number smaller than the given input. If I only read the description as it is currently, I'd imagine the task is to find out whether the input is pronic. The actual task can only be gleaned from the kata's title, if you pay attention, or from taking a closer look at the method's name.
Revised the description. Thank you for the suggstion.
SQL Translation
in SQL for n = 40207 expected is 39800 why not 40200 ?
also I found that I get buffer overflow error when attempt so I see no diff. Not sure whether that could be fixed
Could you retry now? Maybe the overflow is because of the large number of test cases?
now it works, cool!
yes, "Max Buffer Size Reached (1.5 MiB)" is because of the large number of test cases. Maybe it is possible to output only some part of the diff, I'm not sure how it works
.
I decreased the number of test cases to 2000. Should give better user experience.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.