7 kyu
Monkey's MATH 01: How many "ZERO"s?
471 of 1,175myjinxin2015
Loading description...
Strings
Regular Expressions
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.
This is a tedious kata that doesn't particularly test actual coding knowledge as much as it tests patience for unnecessary menial labor.
python new test framework is required. updated in this fork
Approved
C++, C#: the reference solution does not handle
()
correctly.Fixed
Ruby 3.0 should be enabled.
Description formatting is broken.
Enabled & fixed in this fork
My solution (c#) sometimes isn't passing final solution - i'm not sure if there is a problem with my code or with submitting algorithm.
g should count as two zeros as well as B or 8 and &
First, thanks for your feedback and attention ;-) I noticed that, some people had mentioned this problem. My idea is not to change the definition of
g
. There are two reasons: 1. In some fonts, theg
's tail is not closed; 2. If I changeg
as two zero, more than 100 guys' solution will completely ineffective. So, please forgive me ;-)This comment has been hidden.
OK, As you wish, I rewrite the test method and the random character generation function.
As an old Kata (I created it 10 months ago, it was my first Kata), I have almost forgotten the meaning of a pair of braces...
C++-Translation kumited.
Please check it and approve. Thanks!;)
C#-Translation kumited.
Please check it and approve. Thanks!;)
Approved, thanks for your work ;-)
Thank you. :)
Providing a table would break kata exploration but you should at least put a line in description with all the characters you need to check in a normalized font such as
monocode
usable in Markdown and make the appropriate corrections in your tests (such as 'g' == 2)Thanks for your suggestion, I've added a simple table. ;-)
This is my first kata, perhaps not very perfect. From this Kata began my author's road, up to now there are more than 200 katas. I even unpublished the other 3 Kata of this series, only to keep this one as a souvenir...
I didn't mean to break this kata exploration, it was kinda funny. But description leads to error with some values, especially when you try to guess them in Codewars IDE.
By the way, publishing 200+ katas is really impressive ;-)
my goal is 1000+ ;-)
I think 'g' should be count 2.
In some fonts, it only has one
0
at top, so I count it as 1. Thanks for your feedback ;-)Ruby and Python translations submitted :)
This comment has been hidden.
Both Approved, thanks~~
This is a bad kata - truely for monkeys.
Very interesting view, sorry I just saw. Have you changed your name? Gigi ^_^
Maybe a declaration on FONT is somewhat a good hint...you know printing and handwriting is not the same, even Gigi knows it.
HAHA, My computer can not display handwriting font...
Nice idea, but it is too many work.
I mean providing a map
{symbol : zerosCount}
manually is boring.You should add the list of testable characters at least. (I'm agree with somoza's comment)
However, I can't keep silent that the description itself is made interesting and tempting :)
I think providing the map of what characters count as how many zeroes up-front would allow for a better experience.
This comment has been hidden.
To keep a certain amount of exploration will make Kata more interesting. ;-)
This comment has been hidden.
never ever put anything in preloaded section that will be used to test the user, it can be used and manipulated by the user.
Really? If it is private too (C#)?
which place IS safe?
This comment has been hidden.
This comment has been hidden.
Move solution out of preload block
This comment has been hidden.
Sorry, forgot to give you points - but now you have;-)! PS: was a question of time that you start publishing katas - surprisingly JS instead of C#;-)
just a try, i think make a kata in JS is easy than C#
Don't know, think there's no big difference, JS catches more users, C# surely is growing (especially here on codewars), ... it's my favourite (professional) environment - and i mostly do what i like;-)... But i have to admit, meanwhile for quick and short solutions i like/prefer JS too:-)
I'm think so too. I improved my test case, your code is out of work. But you don't have to mind ;-) And I want to know, I put the code (which for generate random test and verify user answers)into the preload block , is it correct?
Corrected it and it works again;-). The preload block is the only block you (normally) can't see - i think. If you put it into the "testcase" block it's visible at the end after completing the kata. So i use "preload" for these things too. But you have to hide most things (C# => private, you can look inside my code for example), or it's "easy" to cheat - but i'm no expert here, it's not so interesing for me how to cheat katas (makes no sense to do this)...