Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Sample tests have some wrong.
L.....
shouldn't beLLLLLL
.3002
, but the except string length is3000
.Are there any cases that take a long time to execute (javascript)?
In the basic tests, the longest execution time falls between 30 to 50 ms.
However, I still fail to pass the 12000ms limit.
Additionally, due to the timeout error, I am unable to print anything.
If so, does that mean the total lifespan from birth to death is 17 and 18 days?
If not, does that mean the initial pigs are actually 5 days old? Or are they 1 day old and already mature?
It's weird to use pigs here.
If no existing species fits your need, you could simply create a new one.
Or just say these pigs are from another planet, so we won't use real life case to think about it.
Spent 2 hours for not reading properly XD
It's a bit late, but I'm sure someone else has faced this issue too.
This kata requires you to return a String.
I tried to clear up any confusion in the description, it was really hard for me to figure out what I was supposed to do.
Use
console.log()
to see the input.Issue
tag is for kata issue not your code issue,you should choose
Question
to looking for help.Your checking rules is not what description says, there just 4 rules and you have 5.
Fixed translation here. Need someone to approve.
It has already been approved.
If that, I'll prefer it to be a new kata. Otherwise thanks for replying.
I often forget about that ternary operator exists, and use if...else.
Approved by someone
ideally there should be some explanation in the initial code, yes. you can open a suggestion to request that.
Using enums is a great choice when they are supported.
But on Codewars, you don't get the exact definition of the enum, so you need to guess how to use it.
Is it really a good idea to go with that?
Loading more items...