Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This is a terrible problem statement to inflict on beginners. We're told not to use any kind of measurement, but we're not given any indication of what moves we are allowed to use. The author just assumes that their solution is canonical and that anyone can be expected to reach the same conclusion. Personally, I would hold one end of the curtain in my left hand, loop it around some fingers of my right hand, then back around the fingers of my left, then grasp the other end in my right hand, and pull them taut so that the curtain is exactly tripled over. In principle, this procedure could be repeated until the folded length is small enough. But that's not the intended solution, so it's "wrong".
Ooh, I get it. The
runBFBF
function creates and runs eachoutput*.bf
in one fell swoop, so you never get a chance to see it if everything crashes.I split up that function in the Preload and changed the "few selected bytes" section of the Sample Tests to read
This allows the player at least to see the output code before the crash.
I've republished the kata with the changes. Due to issue #144/#106, you may not see the updated Sample Tests until you resubmit a solution, but the issue should be resolved for new players.
This kata does use the usual bf interpreter, and the comment-loop trick is working for me. Can you give me a specific example of code that causes the incorrect behavior?
To your second point, the example test cases do console.log the program's output code in the "few selected bytes" section. You can see them by clicking the triangle for that section in the Output pane. If you want to see other outputs, you can see how to modify the test cases even without knowledge of Javascript.
When I try to edit it, it runs into the issue
https://github.com/Codewars/codewars.com/issues/1134
So I tried forking it here:
https://www.codewars.com/kumite/5b8957fc979532035500010c?sel=5bd486507645b91db500003f
It appears to be awaiting approval.
No worries! I'll be around whenever you get the chance, just let me know!
Python. I had tremendous fun; thank you.
Needs IPv6 :D
()_()
Why should the empty string be rejected? An empty binary string is the sum of no powers of two. The sum of no things is zero. Zero is divisible by 7.
My solution here doesn't work. For one thing, the "carry" flag never gets set back to zero. Even if the rest of it worked it'd be clumsy. So, uh, don't do as I have done.
Please check out Python translation in kumite https://www.codewars.com/kumite/5b8957fc979532035500010c
Unfortunately, after fiddling with it for a while, I found I still had to reduce the number of test cases to get the solution within the time limit somewhat reliably.
Did that test case just rickroll me?!
This comment is hidden because it contains spoiler information about the solution
This is reminiscent of a project I was supposed to do in school but never did. And now I have!