• Yeah, you're correct. I got confused because I expected different maths. My bad.

  • Could you elaborate about that?

    "Testing for dad's age: 36 and son's age: 7" The expected answer is 14 and it's in the future, when the father has 58 and the son 29. I think all those cases when you say it wouldn't make sense are the same.

  • The description's wording is ambiguous. It should explicitly state that the expected number is the number of years since/until the father will be twice as old as his son currently is. The other interpretation (where time is considered to have passed for both of them) would not make sense for a majority of test cases (as the son wouldn't have been born for most).

  • dud i'm not gona waste 15 minute to learn some stuf not gonna add any knolage to me to just solve one single keta!!!

  • impossible, because of the restrictions given in the description:

    0 <= x <= 4
    0 <= y <= 4

  • Could a test case added with a result over 10 in one of the entries?

    Some solutions are not changing the results to integer because just comparing the characters is enough. But comparing "12" to "2" would give the wrong result to them. Specially if they don't split and just compare the first and third character, so "1">":" is also false.

  • Not an issue, it was 5 years ago when they had 50 and 25.

  • This comment is hidden because it contains spoiler information about the solution

  • Not a kata issue. What if it was in the past? You'll have an infinite loop, and that's causing the time out.

  • This comment is hidden because it contains spoiler information about the solution

  • Oh wow that's so weird I didn't realise. All the solutions seem to only deal with the static age of the son but it looks like it doesn't matter as long as you understand the maths. I understood the question, just not the maths needed.

  • Yes, he will be twice as old in 2 years.

    –°alculate how many years ago the father was twice as old as his son (or in how many years he will be twice as old).

  • This comment is hidden because it contains spoiler information about the solution

  • Either your code causes that error or you changed the sample test and that caused that error, click reset and start over.

  • When compiling gives error "Unexpected } on line 9" when I don't even have a line 9.

  • Loading more items...