Cody

James

4
Rank
32
Badges
25800
Score

Activities

51 – 100 of 3,450

James submitted a Comment to Solution 1306727

Test suite changed to prevent solutions like this one.

on 22 Oct 2017 at 20:02

James submitted a Comment to Problem 44316. Pandigital Multiples of 11 (based on Project Euler 491)

I just feel better knowing that even Alfonso messed up a bit on this one. If he can screw up, what chance do we mere mortals have? ;-)

on 21 Oct 2017 at 23:36

James submitted a Comment to Problem 44316. Pandigital Multiples of 11 (based on Project Euler 491)

I figured out what the issue was with the code I was using for the test suite - I neglected to put in the check in to make sure that the first set of numbers I was checking hadn't already been calculated by the code. It wasn't a problem when there were no repeats (X<10), but once X>9, repeats started occuring. Since 1-2-3-4-0 and 1-2-3-0-4 were both checked and calculated, that made my values higher than they should have been. (Short version - I forgot a "unique" command.) On the bright side, going through the code line-by-line to figure out what was going on allowed me to make it much, much faster. And now we know why this one is a hard problem! :-)

on 20 Oct 2017

James submitted a Comment to Problem 44316. Pandigital Multiples of 11 (based on Project Euler 491)

Reggie, I think you may be right, and I think I know what the issue is with my test cases. Sadly, I can't check out my suspicions yet; the machine I need to use with enough memory for a brute force test for x=11 is currently using all 12 cores running very long calculations which are using up about 85% of the available memory. I've disabled the X>9 cases in the solution set for now until I can double check them, so the problem should be much easier now. If your solution works for X<10, go ahead and submit.

on 19 Oct 2017

James submitted Solution 1302153 to Problem 44343. Pair Primes

on 19 Oct 2017

James submitted a Comment to Solution 1291915

You are correct, Daniel. The typo has been fixed. Thanks for pointing that out!

on 19 Oct 2017

James submitted a Comment to Problem 44350. Breaking Out of the Matrix

Your syntax works just as well, Yuichi. With the arrayfun @(y) going from 1:numel(x), y=x(y).

on 18 Oct 2017

James submitted a Comment to Solution 1291915

Test suite changed to try to prevent solutions like this one.

on 18 Oct 2017

James submitted a Comment to Problem 44337. Sums of Distinct Powers

I've changed the description to make it a bit clearer that you can use any number of terms in the sequence. Hope this helps.

on 18 Oct 2017

James submitted a Comment to Solution 1297085

Getting this one right on a version of MATLAB without the "string" capability was painful. I didn't know you couldn't convert a string to numbers by doing the string-0 trick like you can with char...

on 18 Oct 2017

James submitted a Comment to Problem 44337. Sums of Distinct Powers

You've almost got it, bmtran. You are missing 7^2 + 7^1 + 7^0 = 57 in your example. Put that in, remove the 392 (since that's term #11 in the sequence) and you have the correct answer.

on 18 Oct 2017

James submitted Solution 1293501 to Problem 44372. Polarisation

on 17 Oct 2017

James submitted a Comment to Problem 44319. Write c^3 as sum of two squares a^2+b^2

First case is also wrong: 1^3 = 1^2 + 0^2. The problem doesn't specify positive numbers, so it is a valid solution. (If you *really* want to open a can of worms, a and b don't have to be integers, or even real numbers according to the test suite!)

on 17 Oct 2017

James submitted a Comment to Solution 1292583

Any idea what the time limit for the Cody solutions is? I've got code that runs the test suite in about 2.3 seconds on my (six-year old) machine, but it's timing out repeatedly on Cody.

on 17 Oct 2017

James submitted Solution 1290243 to Problem 281. Acid and water

on 16 Oct 2017

James submitted a Comment to Solution 1289911

Lots of ways to get the right answer for this test suite...but I think this is one of the silliest.

on 16 Oct 2017

51 – 100 of 3,450