Beta
Shelve your trophies
Loading description...
Mathematics
Puzzles
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.
not enough random tests.
your solution is incorrect:
4.#.1
=> 4 is on shelf 04.1.5
or5.1.4
=> 5 is on 15.1.2
=> 2 is on 00.1.2
=> 0 is on 11.x.2
=> 1 is on 11.1.3
=> 3 is on 0all trophies positions are perfectly determined and there is only one solution.
your solution isn't robust enough:
Peculiar. I had gotten this error on the first run, then proceeded to run it again quite a few times until I landed on it again, so I could see the circumstances; but it never came up. I'll look into it, but I'm very confused as to why it happens.
Hi,
Sounds interesting. But you forgot to give some information:
Aside of that:
About the indexing: yes, both are 0-indexed, that was meant to be a convenience but it definitely requires a note — I'll add that to the description No, not all shelves need be used and no shelf has a maximum trophy limit (although that might be an interesting addition); these will also be added
About the tests, I definitely ought to, absolutely. This is my first time making a kata and was sort of a test to see if I could (this is actually a variation of a question on an LSAT that my friends and I were doing math on for some reason), so I greatly appreciate the criticism.
'kay I figured that on my own, but thx for the answer.
Note that your solution is very slow. So you need to improve it otherwise you won't be able to push the number of tests. Note also that some maths could be used to reduce drastically the amount of computations in some cases. That might be interesting to add that. Maybe it could be worth of unpublishing the kata so that you can polish it a bit?
Mine being without optimisation (apart from the rules I check or not), I get things like this: