Retired
Find number with most divisors (retired)
Loading description...
Algorithms
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.
The order of returned values is not specified.
Multiple issues:
snake_case
)I have understood. It has turned out that there was simply "not enough" list of prime numbers. At increase in the list to 173 (would be possible less) the mistake was gone.
Somebody can explain how to understand a mistake: [2492, 1988] should equal [2492, 1988, 8253] in ATTEMPT?
"RUN SAMPLE TESTS" passes without mistakes. 4 tests pass in "ATTEMPT". The fifth gives a mistake: "[2492, 1988] should equal [2492, 1988, 8253]" My code for all numbers - 2492, 1988, 8253 - gives identical number of dividers - 12. And findNumberWithMostDivisors ([2492, 1988]) gives out [2492, 1988], and findNumberWithMostDivisors([2492, 1988, 8253]) - [2492, 1988, 8253]. What has to be equal to what in [2492, 1988] should equal [2492, 1988, 8253]
For python you shouldn't have CamelCaseFunctionNames. I didn't need the list of primes and solved it using simple brute force. If you want to force a better approach I think you need test with longer lists of numbers. I enjoyed it nevertheless.
Sorry. As this was my first kata, it was not streamlined. I thought a list of primes would help,... but fortget about it. Thanks.
dont know that the deal is but this is annoying the hell out of me im gonna leave it and come back later
This is an error on this test.case: test.assert_equals(findNumberWithMostDivisors([100,150,18,96]), [96])the answer is not [96], it is [96, 150]. But when submitting, it pass.
This comment has been hidden.
Thank you for your comments You are right, this is my misktake. Shame on me.. I will fix it.
Re-raising as an issue.
Your second static test is wrong:
Solution is [96,150], both have 12 (or my code is wrong, but works for submit:-));-)!
I wonder how I made such a foolish mistake.. TT Thank you.
No problem, happens...;-) But you should fix it (can't see if it's fixed, think not - sometimes the testcases don't refresh).
That's a little weird.. I fixed again. Thanks