Ad
  • Default User Avatar

    I think my solution correctly gives the "brute-force functions" requested in Task 1. Now I've seen other solutions the 2nd task is superfluous.

  • Default User Avatar

    A nice little problem that was fun finding the optimal code!
    I'd just say that the numerical examples are necessary to sort out e.g. when c0 is taken.

  • Default User Avatar
  • Default User Avatar

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

  • Default User Avatar

    I had a random test (data = 5864, 8410, 1193, 1.5) fail with a value just below x.5000 (in both my Fortran & Excel) being rounded UP to x + 1, so I added a halfpenny!

  • Default User Avatar

    In your instructions the example output, ["M: f", "B: b", "C: c"], should not have any " or , !

    I see the other 2 solutions write results with format "(A, I0, A, I0, A, I0, A)", is "(3(A, I0), A)" not good practice?

  • Default User Avatar

    Hi, I'm still stuck like my last post - sorry to send it on a weekend, I realised almost immediately after hitting "Post".

  • Default User Avatar

    Try a different zoom level - I've just posted on a very similar problem.

  • Default User Avatar

    I'm using Firefox with my default/best zoom level of 110%.
    This causes the "Discuss" button to be invisible on the training (non-scrollable) screen. Please note, everbody who told me off for posting in the wrong place!!

    I've also just discovered a "Maximize editor space" button at top right, for the same reason.

  • Default User Avatar

    A nice little problem - easy to time-out. Why not use "a" in place of "i" in your solution? :o)
    I think your description with "chooses two numbers, a and b" is quite clear, a and b are not the same number, jcolicchio. But what happened to n being "relatively small"?

  • Default User Avatar

    Not sure why Ann & John need separate routines, but I kept them anyway. And in so doing I left John with his arr() too short - should be arr(0:n+1) to hold the summations.

  • Default User Avatar

    When I run the sample tests the 1st test case (for example) says in red that expected is "+ctg?.nadr d gdbW" which is the first line of my result. Then the log (in white) starts with "+,i lnis tl eh" which is the 2nd line of your (and my) result, whilst the "instead got"... begins with our first line "+ctg?.nadr d gdbW". This happens for all coding; decoding is OK.
    N.B. In the above, char(11)s have been replaced by "+", in both my code and your test data.

  • Default User Avatar

    A nice simple one. Did you notice you've got the calculation of kk in the inner (n) loop?

  • Default User Avatar

    You win, g964, that is so neat (and obvious, AFTER I'd stepped through a couple of cycles!).

    Yeah, Voile, but who's to know that a better algorithm is out there, waiting to be found! :o)

  • Default User Avatar

    Thanks for that very quick response. So, twice or more tests - no more tinkering, major re-think. I do have something in mind and will now give it a go. Cheers :o)

  • Loading more items...