7 kyu
Buses!
412 of 509PulserCoder
Loading description...
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.
any suggestions to solve this 7 kyu kata that is harder than a 5 kyu?
Try to think logically. It's really not a difficult task ;)
Hello Blind4Basics et al,
Could it not be argued that since in your second example below where kids = 0 the answer could equally be zero... as no kids are going to camp?
Just a thought...
I'm sorry, I don't understand your message.
I shouldn't argue about what? I'm not arguing at all, actually... => ?
And in that second example, one actually need 18 buses to "move" the adults. => ??
Hello Blind4Basics et al,
My contention is that since there are no 'kids' to be chaperoned to the camp an alternative answer might be zero.
I apologise if I have caused you any offense. That was not my intention.
I'm merely putting forward a different answer.
I hope that makes my position clear.
No offense at all, don't worry.
But your answer for that case doesn't match the task. The goal is to give the number of buses needed to carry people, and if there is a restriction on the number of adults vs the number of kids, there is no restriction on the number of adults "alone". so 0 cannot be a valid answer here.
Side note: that expected output is coming from the author's solution, not mine.
Ok
Hi,
those should be added to the fixed and example tests in all languages:
Cheers
C++ Fork
Additional fixed tests:
Added in this Fork
Please review: C++ Translation
Approved by someone, thx
It's still incorrect.
And:
Individual adults can take the bus because there is no need to protect kids.
My fault
These are correct.
perhaps this one is incorrect.
It's same as monadius's issue. Issue closed.
Description should be language agnostic, so
can be improved into (with added explanation)
thanks a lot, fixed it
.
Hi, there's some inconsistency in random tests. I got this message:
buses(0, 8, 2): 4 should equal 0
But you get more fails after changing the solution to return 0 when there are no kids:
buses(0, 46, 17): 0 should equal 3
buses(0, 33, 5): 0 should equal 7
This comment has been hidden.
fixed it
The reference solution is incorrect:
Solved it, thanks
This comment has been hidden.
fork
(approved by ..)
Explain variable names (and pick some better names) -> btw, uppercase letters -> is that the Pythonic way?
thanks, fixed
.
what do these variable names represent?
N, M, K
they were described in a previous version of the description... That's actually an issue ;)
Hi again,
Cheers
Thanks, done it
.
(note: you can close the issues/suggestions yourself, when you're sure you resolved them)
Please provide assertion messages when random tests fail. For example:
Thanks, done it
.
Hi
Cheers
Thanks a lot, i will correct it
fixed
.
Thanks a lot, fixed
shouldn't this return
0
and not-1
?Fixed by author