8 kyu
5 without numbers !!
16,518 of 36,973KH!
Loading description...
Restricted
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.
is it possible to use random for this? that was my first thought
nice one
I like this one.
This comment has been hidden.
You used
+
in your code.The error message is confusing:
Maybe
or math operators
should be added.or perhaps just a reminder from the description:
i added more personalized assertion messages to Python
I hadn't read the description till the end. Not my first time 🙄
I had doubts at first, but after questioning it, the solution was simple.
This comment has been hidden.
both are valid solutions
Scala translation
CoffeeScript translation
It's a good kata, But an additional notes that # is also not allowed would be nice.. i tried to solve it using acii and make it as a notes. already using the len methods but never returns tru. To all that is crawling on the discourse sections... "DONT USE #### AT ALLL"
Overthinking most of the time hahaha good kata !
funny kata love it (:
I'd try it in Haskell but there's nowhere to put it. Does that mean it's impossible? Surely not...
Someone needs to make a Haskell translation for it to be solvable in Haskell (it isn't impossible in that language at all).
Funny :)
It is simple but make me thinking a a lot !
based
not hard but...
Very satisfying and logic building kata.
<3 <3
How come there isn't an extremely satisfied button to vote for kata?
Lol, yeah I don't vote for kata as often as I should but this one is totally getting one!
This comment has been hidden.
the challenge has been laid down on the table. suggestion noted, but at almost 25K solves to date, it will not be changing
I figured that this was the case, just posting for general code precision and concision.
Why would that be better than the other option? Please use spoiler flag on your answer.
This comment has been hidden.
Comment line contains
/
,//
to be exact, that's forbidden. Not a kata issue.oshi i didnt realize the comments are scanned too, my bad :D thanks
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Maybe try
reset the trainer
! Your solution is working fine when I tested in the oldest and newest JS version.What do you mean by
reset the trainer
?There is a
Reset
button, click it.Ahhh okay thank you Chrono79!
I think this is an issue: return int(True)+int(True)... five times gives "cheater you can't use numbers" or something. No numbers used..
Oh, even + can't be used, understood ;)
This comment has been hidden.
Because:
This comment has been hidden.
You're using
-
, aren't you? And it is in that list, nothing is unfair there.That's very much the problem yeah, not being able to use any of 0123456789*+-/ is a decent head scratcher
Ooh, I'm sorry. I didn't pay attention. Thanks tho
Actually a hilariously good problem
That forced me to think more than I assumed at the beginning. The funny part was that the code broke after I've put a comment in it.
That was a really creative taka. loved it
This was fun! An example of mind trickery. Get the number 5 without thinking of 5. I couldn't stop thinking of it!
Ufff. En este punto si me siento muuuuuy ignorante :/
si nos va a pasar mucho xD
This comment has been hidden.
Not a kata issue, check the forbidden chars list again.
This comment has been hidden.
the test doesn`t work correct it's warse time kata
It works just fine. Not sure how to help, because you provided no details...
See https://docs.codewars.com/training/troubleshooting for general tips.
I don't know if it was just me but something was wrong. The kata is good nonetheless but the issue is Value error. my code was the same as everyone and contained other code examples in comment. My code outputted 5 but Value error when there was none. I went ahead on other sites with the same problem and they worked. Just a heads up.
Not a kata issue. See the list of forbidden chars,
/
,*
,0
and1
are in your code, they count even as a comment.This comment has been hidden.
This was very fun. I've coded a one-liner solution which I thought was very clever, but as I checked other's codes,,, just wow. Mine was garbage
haha it was fun
This comment has been hidden.
Don't spoil the solutions please. I marked your message with the spoiler flag.
oh sorry
That was awesome. Definitely in the top 5 ;)
This comment has been hidden.
why is a comment included if it's going to cause the tests to fail..
We don't know what you are doing exactly with your code because it is formated properly, but the solution is correct. You probably have a syntaxt error non related to the kata. You should try to click
reset
at the bottom to get a new clean initial code (save your code locally if needed because it will be erased from the trainer window).I had the kata's comment included, but ommitted it from my original post. The inline comment's forward slashes were causing the validation error.. I think that line should be excluded from the tests..
The comment doesn't cause the error. Commented lines are ignored from the code. You must write your solution out of the commented line (or just remove the commented line).
This comment has been hidden.
There is nothing to change or to update, you must just learn the very basic of programming: comment lines are ignored. I didn't say you had to remove the comment, you can remove it, you can leave it, it doesn't change anything. Just don't write code inside a comment line or it will be ignored. Your solution works, if you respect the syntax of your language.
Please stop posting your code, it is not formatted and not usable, and you must use a spoiler flag when you post code. See there: https://docs.codewars.com/training/troubleshooting/
dude just switch to c# and leave the inline and attempt to submit the solution. it will fail saying 2 banned chars are included.
CountNotAllowedChars is iterating over each char in your submission and increasing everytime a banned char is encoutered. This includes comments, so for you to say they are ignored (in the sense of this test case) is just flat out wrong.
Edit: ok I guess I hurt akar-0's feelings and got blocked... this kata will fail for C# if you leave in comments
Removed the comment from the initial code in C#.
Thanks, i think this should save some people confusion in the future.
not sure what that other guys deal was.. how do I block someone that's already blocked me lol?
I am feeling such an idiot.
There's a special place in hell for this kata XD. I was about to have a breakdown ┻━┻ミ\(≧ロ≦\)
right!
There are some amazing solutions in here! Very creative!
Nasm translation
Approved :)
Gotta admit that I was thinking way too complicated but I really enjoyed this Kata so damn much! Cheers mate for this splendid piece of work! :>
This is definitely one of my top five favorites.
I had fun - no math , no long description and fun ways to solve .
This comment has been hidden.
You can't use
+
, it's in the description.oh yes sir, my bad
My solution is not using any of the banned characters and is still failing the tests
The cheat test specifically.
We can't read your mind, please, post your code so we can check it. Mark your post as having spoiler content too.
I figured it out.
This comment has been hidden.
Error message is confusing, but you should not use any of
*+-/
.Feel free to raise an appropriate issue.
s
This comment has been hidden.
This comment has been hidden.
True is a digit????
It was fun). Thank you author
i'll remember this Kata forever lol. Thanks this was fun :)
it is funny kata :D
Dood I like the error messages 'lol' and 'cheater: u cant use digits' ;)
they had us in the first half not gonna lie great and kind of challenging kata!
This comment has been hidden.
This comment has been hidden.
3 and 2 are numbers.
What a great kata! Great way to stretch the mind and look at possibilities.
Most fun kata to date!
This comment has been hidden.
You're using
0
there, that's banned.Oh my... hahaha ok thx :D
Well then I will delete this post. Thanks!
#Edit - Can't delete it xD
this is pure evil ! joking, love it !
wow, i gave up, i can't believe how easy it was, i was trying for about 1-2 hrs but nope
Nice Kata. KH!, Thanks for making me ROFL and teaching me not to be serious while coding.
Thanks with deep gratitude to all the Kata creators. I have been able to complete all the Katas in 8 kyu without unlocking the solution for any of the Katas.
I could not understant for a long time, why my solution was wrong. The reason was empty comment '//' :)
Thanks so much denmel! I couldn't understand why either, until I saw your comment( ;) ) and then mine worked too! Cool!
thanks
Thanks, the same //
Awww, you saved me!!! I just can't figure out why my solution keeps returning wrong;
Great kata! I am impressed how many awesome solutions people produced.
This comment has been hidden.
For what? To forbid evaluating multiple things to integers and adding them instead of evaluating
5
directly?Well, the author forbids the operations
"+-*/"
.Spent way to long thinking about numbers, when I should have been... writing to solve it ;)
This comment has been hidden.
None. It's working fine for C#.
But my solution does not pass the test.
It passes all tests for me o_O Maybe try hitting reset kata and try again.
It didn't help. If I click TEST all tests are passed. If I click ATTEMPT I get an error "you used prohibited chars".
Did you click 'reset' ? Do that first, then try again.
It worked when I deleted the comment //Do Some Magic) Thank you for your help!
Same thing happened to me. It shouldn't be checking the comments for the forbidden characters. That ain't code, it's just comments.
fun
This comment has been hidden.
This comment has been hidden.
It passes all tests for me o_O Maybe try hitting
reset
kata and try again.yea that worked. Thanks!
This comment has been hidden.
That's a spoiler, not a kata suggestion. Suggestions are comments to improve the kata, adding some edge case, clarifying the description, etc.
oooooh, Ok I thought it's suggestion for people trying to slove problem.
This comment has been hidden.
To mark your comment as having spoiler content, there is a checkbox below the textarea where your write it. Your code is full of
/
that are forbidden. It doesn't matter you're not using it as division.same for the numbers (in the comments)
Thank you!!
Sorry I was completely blind to the comments. Ok, it looks like my ugly solution has passed the cheat test now. yay.
I gave up. I saw the solutions. And weirdly enough, it is exactly what I tried. The cheat test kept failing. Now ofcourse, I do not know how come those solutions pass. It still does not pass when I try that!
I've copied/pasted one solution you commented it doesn't work and it worked for me, could you copy/paste your code that wasn't working here marking your post as having spoiler content?
No response after a week, and it can't be reproduced, closing.
Thanks for closing. I was expecting a
reply
option below each comment. Figured out how commenting works now. It was an issue with adding comments using/
Pure fun :)
This comment has been hidden.
I know, but I won't tell, fixed it.
lol, thanks
uh... I messed it up without knowing it. 🤣
This comment has been hidden.
There are solutions using what you're trying to use. Something is wrong with your code.
TypeScript Translation!
PHP Translation Please Review And Approve ;)
I've submitted C# translation Please review and approve :)
This comment has been hidden.
This comment has been hidden.
First: Mark your post as having spoilers when it has. Second: read the instructions again:
Do you see the minus sign there?
This comment has been hidden.
For an
8kyu
I think that is intended.Nobody's going to change the requirements after 2500+ solutions were submitted.
This comment has been hidden.
Your function expects an argument n, which is not given in the function call provided by the test. Also, since u define the n variable inside the function, the argument is redundant and not used.
it is fun to see how other people get the answer "5"
Added sample test to C and Python. You're welcome.
"you used prohibed chars !!!!!"
prohibited
Fixed.
This comment has been hidden.
There are no Sample tests in Python, try Attemp button directly.
Got it! Thanks very much!
This comment has been hidden.
Take a look at which characters are banned again.
The error message is misleading, but Souzooka is right.
I got it thanks
‘-’ can't be used!
It's "-" that can't use
Ruby translation kumited. Review and approve.
@KH! are you there? Is there a problem with the translation?
Done.
I made a C# and JS translation for this Kata.
https://www.codewars.com/kumite/5a73bcb1fd57774aca0000ed?sel=5a73bcb1fd57774aca0000ed https://www.codewars.com/kumite/5a73a8575084d7fd0f00006a?sel=5a73ead65084d78312000041
Approved JS, and C# was rejected at some point.
JS version always shows failing anti-cheat test, but then passes anyway. Needs to be fixed..
translation in groovy submitted
https://www.codewars.com/kumite/5a674e7980eba8836b000033
Approved.
Had a right answer in Python and pressed 'Sample Test Cases'... didn't work. Didn't realize I have to upload it as a final version right at the beginning. So I didn't get any points, because I thought I made some misstakes and looked up the solutions. And there it was.... So please add just one test case to prevent missunderstanding.
Thanks for this comment! I have been able to resolve the kata thanks to you! :)
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Can I have a hint? I'm a beginner;-)
One way is to convert characters to their ascii equivalent, which are numbers, then extract the number you want. I haven't solved this, but this is how I would approach it.
I really like this kata, there are a lot of creative solutions possible.
This comment has been hidden.
This comment has been hidden.
I did that and it still didn't work.
Added sample test cases.
C does not have sample tests.
Now it does.
This comment has been hidden.
Test cases missing, you've to put your solution as the final answer without using test cases. Had the same problem and didn't get any points.
This comment has been hidden.
what i meant is that those chars can't figure anywhere in the code (you can try puttin' them as comments lol")
This comment has been hidden.
This comment has been hidden.
Thanx for help i forgot to change that
it is fixed now :)
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
thanx bro u r great !!
P.S: English isn't my mother tongue either lol !! :)
(damn, I lost my eyes!! 8-P )
This comment has been hidden.
Seems pretty fine, now, for an original 8kyu (actually).
Please, do not forget the capitals in the description, and are you sure about the name of your function? ("wired" or "weird"?)
Good to go, in my opinion.
Cheers
thanx for your help in fact i am new at making katas (this one is the second i make) i will roll your suggestions in
I don't want to sound mean but this seems too easy even for 8 kyu, even easier than the first kata when you join codewars.
says "just for laugh" a not meant ta b challenging, i can also remove it if ya want
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.