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.
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.
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.
This comment is hidden because it contains spoiler information about the solution
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!
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?
Hi, I'm still stuck like my last post - sorry to send it on a weekend, I realised almost immediately after hitting "Post".
Try a different zoom level - I've just posted on a very similar problem.
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.
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"?
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.
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.
A nice simple one. Did you notice you've got the calculation of kk in the inner (n) loop?
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)
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...