6 kyu
Pizza pieces
634 of 2,237Yabiten
Loading description...
Mathematics
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.
C#: method name should be
PascalCase
(Please refer to implementation of backward compatibility here )This comment has been hidden.
I found this online Ignore the left one, I am not sure what it means.
I actually figured it out and came to delete my comment. Might as well leave it up since your image is a good example. Thanks for sharing!
It seems to me that the picture on the left preceeds the picture on the right; that the three arrows are suggesting you move the three lines inwards, forming the second scenario.
This comment has been hidden.
I Think you're wrong. I've controlled it in a fork, and it' not as you say. Then I tried the attempt tests from the trainer, printing first
cut
and then the result my function returns, and here is a sample of what I get:What makes you think that?
This comment has been hidden.
This comment has been hidden.
Could you check now?
I've just tried now and it seems ok. I didn't understand what was the problem?
FTW found a bug in the random test verification method. I will let him verify and resolve this issue.
ut-actual
comparison while result was set inut-actual-numeric
.fixed. closing the issue.
thanks @dfhwzwe
Yeah my nickname isn't the easiest xD And thanks for spotting the error.
well at least you know that ;)
I got this one on a code test via Qualified.
Java and C# tests are a complete joke.
I've updated the Java and C# versions to be the same as the Python/Kotlin ones. If you want to raise an issue, say something more useful than "tests are a joke".
It seems to have been a pretty effective statement. Within the hour, a user changed both Java and C# tests. ;-)
Clickbaited into fixing it :D
Thanks @FArekkusu :)
For all those wondering how 3 cuts end up with 7 pieces -> they are not cut through the center point only
Pretty hard kata for 6kyu. I didn`t know the formula. My solution is based on sequence of answers given in test case.
C Translation kumited.
approved
HOW CAN YOU HAVE 7 PIECES WITH 3 CUTS ???????
https://www.codewars.com/kata/5551dc71101b2cf599000023/discuss#5f46613fcecf9e0020a28024
Forked Kotlin translation. Please, review and approve (the author is inactive).
apprved
one of the test cases is a negative number. What does that mean?
ah!
COBOL translation please review carefully
Approved, and changed
9(8)
toS9(8)
in the solution setup.ah well spotted
HOW CAN YOU HAVE 7 PIECES WITH 3 CUTS?!!!!
This comment has been hidden.
Random tests do not test for negatives. This should be done as per the description.
Kotlin translation
Could you please review and approve ?
Thanks in advance ! Regards !
check your translation, in the current state this is not approvable
It's a mainly a math problem, not a programming one.
I think it should be noted that no 3 lines (cuts) have a common point.
Have a quick question for you folks. This was extremely easy once I knew of the n-planes formula, but I did not know it previous to looking at the discussion (was confused about 3 cuts being 7, ended up seeing the n-planes comment). How would you recommend learning and remembering vague algorithms like this one?
the description should state "without moving the pizza pieces" otherwise one could double the number of pieces with each cut. then it is as simple as: two to the power of cuts
Um....isn't the max amount of pizzas you can get with 3 cuts 6?
You don't have to cut through the center.
It's ANARCHY! lol There's a hint. :)
Interesting problem. Haven't heard of it until now Thanks
CoffeeScript translation added. Please approve.
There are two more translations (python and JS). Here is a description on howto find and approve or decline those: https://github.com/Codewars/codewars.com/wiki/Tutorial:-Approving-translations
How do you determine the difficulty of this problem? The code is simple, but the mathematical analysis is far from trivial...
I agree. Personally I would give it a 4 or 5 kyu.
This comment has been hidden.
This comment has been hidden.
Should the above comment be marked as a spoiler?
JS translation kumited.
( 3 translations after less than 5 solutions, dinner time or what ? ; ) )
Err... Python ;)
ooops ! too hungry probably :O
Haskell translation kumited. Since this is your first kata, you might be interested in this tutorial on approving translations.
Keep getting 500 error !
remove
namespace bank
and putpublic static int
in correct order in c#fixed.
That was fast :-)
javascript translation kumited
What does the prefilled C# code has to do with this kata? It starts with
Besides that, nice cutter!
Sorry, my bad. I copied another Kata as a template to start with. It's fixed now :)
Thank you, but almost:
Furthermore it has to be
public static int
and notpublic int static
.