2 kyu
Multi Line Task++: Hello World
2,798 of 2,800Voile
Loading description...
Restricted
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.
Hey brothers, we're already provided with the variable f when we write the code, right? We only have to initialize the already declared variable f?
Waster 3 hours, did solved. IMHO: Dumb but fun XD Had to read up some things about JS. Other then that, is not hard, just dumb. Hate JS XD
I am confused, is this actually possible in JS? Line breaks between an arrow functions parameter list and the fat arrow symbol are forbidden, and keywords spread to multiple lines become variables.
Yes, it is possible. You need to find a way without arrow functions and without keywords.
thank you!
I am trying to take up this challenge again, but cannot get below 41 lines. Edit: Finally did it.
User solved it, resolving.
I learned so much with this kata. I couldnt figure it out my self but wow it opened a whole new world in js
I have spent hours now trying to finger out how to go around this challenge but I able to move forward
Good Example
Kata is very interesting!
This comment has been hidden.
Your code fails that condition.
Your code should look something like this:
Note this kata is 2kyu, that means it's difficult.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Thx, it was interesting <3
This comment has been hidden.
There must be some clever trick.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
TypeScript translation
Rejected (because the hack required to get it working is kind of getting hacky) ;-)
Oh! That's so sad!
My solution passes the sample tests but fails the 100 random tests? Is there something going wrong?
No, but your function
f
should work any number of times ;-)This comment has been hidden.
This comment has been hidden.
Yes, once upon a time I accidentally created a new language version and then nuked it soon after. Completion count does not reset when language versions are nuked.
After finally trying for a whole afternoon, I submitted just to see similar/same code submitted by most. Unfortunately cannot cut it less than 31 lines :( :D Either way, it feel like a huge relief that I could figure it out.
This is driving me nuts. I can't figure out the defining function part... I realize that's big part of the solution, but any pointers at least to know what I should look at?
+1. No idea how to even start!
It was hard for everyone I guess. At first, I could only do it in 50 lines, which wasn't acceptable. But I decided to think one thing, "The solution must be something so simple that I cannot figure it out".
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
I've made f a function, now I just need to figure out how to make it return anything 😭
i got stuck at function part but i got rest. How did you do the function part? i keep getting 3 character or more for first line when i'm declaring the function.
hooooooow!?
me too 😭
This comment has been hidden.
Powerful. Admire.
This comment has been hidden.
Thanks :)
Fixed.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Every line must have at most 2 characters. You can write many lines, though. (As much as the code limit allows)
This comment has been hidden.
That's one of the main parts of this tough puzzle ;-)
This comment has been hidden.
Nice outgolf! :D
I just discovered that 37 lines is possible ;-)
Enforcing the new limit now, hope it's now more difficult >;-)
OK. I have approved it and set it to 2kyu like you wanted :)
This comment has been hidden.
Using the current method in the solution I can get it down to
28
. That's pretty impressive! :DSo close, I'm at 46 lines, I'll add you to my hate list together with myjinxin2015 ;) EDIT: Solved it.
Nice :D
I'm also at 46 and can't think of any way to solve it D:
nv mI go ti t
nice <3
For some reason, the code
f=1
fails the line char count test. Can't get anything to pass that test.Sorry--misread the description. I'd recommend tweaking the wording to
2
or fewer characters to help avoid confusion for people that skim the description (like me). ;PTw o Ch ar ac te rs p er l in e? ; -)
Ye s! :P
It 's p os si bl e!
This comment has been hidden.
It's okay, I put the 3kyu author difficulty for a good reason; only those who's solved it (or know how to solve this) will realize the cleverness around this kata and things that are around it though :)
I forfeited and looked at your solution. That made me decide it wasn't for me. Just too artificial. Clever though!
It's a fine kata, it's just not for me. I hadn't yet seen the rest of the series with the relaxed limit. I enjoyed those. :]
I forfeited and looked at your solution. That made me decide it wasn't for me. Just too artificial. Clever though!
It's a fine kata, it's just not for me.
Help! I'm being channeled by aliens!
It's a
sad story
:PI have a new idea I'll make some new kata like
"Triangle Line Task: xxx"
;-)https://www.codewars.com/kata/5937782609515c4ac300001d
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.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.