Retired
How many e's are written when one counts up to n? 1. Chinese (retired)
26 of 27jungerstein
Loading description...
Fundamentals
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.
Test case only goes up to
n = 8000000
, evenO(n)
solution passes. There are no actual performance constraints, which the description is implying to have.This is a duplicate of https://www.codewars.com/kata/55143152820d22cdf00001bb (digit to count changed from
9
to2
).I know that there have been so many similar katas.
However, this kata has its own settings and I recommend you to figure out the shortcuts yourself instead of being hinted so directly and thinking the katas are all the same thing.
That is why I decided to make this kata.
I am sorry for making it so similar, but the settings can be used for something far more complicated.
可惜不会cpp;-)
什么玩意 为毛这些人出题不用汉子
I think you need more secondary / random tests. My first solution passed but gets many wrong. There should be enough tests or a few tests with large numbers to encourage faster solutions.