Cody

James

5
Rank
16
Badges
22560
Score
E-mail

Activities

51 – 100 of 3,067

James submitted a Comment to Problem 42936. Project Euler: Problem 11, Largest product in a grid

Just submitted my solution (slightly modified from the original Project Euler problem! :-), and the values do not wrap around in any direction.

on 31 Aug 2016 at 17:43

James submitted a Comment to Problem 42936. Project Euler: Problem 11, Largest product in a grid

Since I can't tell from the test suite, do you wrap around the matrix when you are calculating the products? For example, when doing the products of four consecutive numbers in the up/down direction, do you do rows 1:4, 2:5, 3:6, 4:7...7:10 and stop there, or do you include the row combinations [8:10 1], [9:10 1:2] and [10 1:3]?

on 31 Aug 2016 at 13:40

James submitted a Comment to Solution 946821

Thanks. I coded that solution up LONG before movmax became a thing...

on 31 Aug 2016 at 12:01

James submitted Solution 945303 to Problem 42925. ASCII Code

on 29 Aug 2016

James submitted a Comment to Solution 945294

Having more than one sample question in your test suite would be helpful, Minhaj, if only to prevent "answers" like this one.

on 29 Aug 2016

James submitted Solution 941523 to Problem 42922. Zero Cross

on 24 Aug 2016

James submitted a Comment to Solution 938316

The problem was with the following line in the error checking: st = sprintf('function y = partitions(x)\n%%%s', st); This automatically changed the first line of your script to use partitions(x) instead of partitions(n). That was done to prevent folks from using the "function ans=blahblahblah(x)" technique when that still worked, That was just a holdover that happened to trip you up. Now that that line (and the rest of the suite0 has been removed, partitions(n) should work just fine.

on 19 Aug 2016

James submitted a Comment to Solution 938316

Strange. The problem you were having had something to do with the error checking suite that was above the solutions. Your solution passed the error checks, but failed to actually work. Now that I have removed the error checks, your solution with partitions(n) passes. I may have to muck around with this a bit later on.

on 19 Aug 2016

James submitted a Comment to Solution 933408

I think you set some sort of record here with *ten* nested commands on a single line, Peng. I'm impressed.

on 9 Aug 2016

James submitted a Comment to Solution 925109

Today's Cody Tip of the Day: Make sure you paste your solution into the text box BEFORE you hit submit.

on 19 Jul 2016

James submitted a Comment to Solution 901588

Should not need the '=' in the 'if j<=t' statement to get the "correct" answer, but that makes the code match the solution in the test suite.

on 3 Jun 2016

James submitted a Comment to Problem 42875. Assignment Problem

You're correct, Jan. Both options give you a minimum time of 10.

on 3 Jun 2016

51 – 100 of 3,067