Ad
  • Custom User Avatar

    In R the naive solution may timeout, depending on the random test rolled. And since mine failed on the first try, I introduced memoisation. Sumbitted, passed (not sure now if coz of luck or not) and found the naive solution to be the "best" one.
    Meh. :(

  • Custom User Avatar

    in R you want to require "\n" and not "\n" as the line separator if the aim is to create shapes in formatted strings:

    cat("aaa\nbbb")

    aaa

    bbb

    cat("aaa\\nbbb")

    aaa\nbbb