Beta
RegEx Like a Boss #5 CodeGolf: Decimal Number Divisible By 3
28sgerodes
Loading description...
Mathematics
Regular Expressions
Strings
Fundamentals
Restricted
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.
Since newlines are valid characters, there should be edge case tests with numbers divisible by 3 followed by one trailing newline.
I get Codegolf error: Your RegEx is 119 characters long. What is this supposed to mean? It is stated that the string length is restricted to 150. My string length is well below that.
It's an incorrect test structure (
@test.it
without assertions), so it doesn't fail, but isn't shown as passed.bin
represents-3
as-0b11
)?Youre RegEx should NOT match ''11''
, what's the point?96
(it is working fine on my laptop), what should I do?"-"
in the beginning, that's allOh, there were 3-4 katas designed for binary numbers, so I thought.... Thanks.
I wonder why those solutions on the Internet are soooo long. The shortest one I could find was 164 chars (without negative/leading zeros handling), while it can be done in 118 (with negative/leading zeros handling). I guess limiting the length to 150 or so will thwart most cheat/googling attempts.
I think it would such a pain un the ass... There are so many Solutions taht are longer that 150 and wariors will just be disappointed that they cant pass even if they have good solutions.
You know what. I changed my decision. Its a great idea that knocks out a lot of the googling part and forces to think. Implemented!
This comment has been hidden.
I am asking myself what ZED is actualy valuing? He is almost always voting my katas in the 6-7 kyu level. What is a 1-4 kyu level Kata for ZED?
This comment has been hidden.
Random test range is kind of too tiny (5 digits is still somewhat easy to cheese). A range like
-10^10 - 10^10
will ensure no shenanigans are possible.Of course, this also means you should state the input range in the description.
Done
Test case
-
should be in fixed tests.done