Cody

Solution 178238

Submitted on 17 Dec 2012
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% assert(isequal(euler029(5,5),[4, 8, 9, 16, 25, 27, 32, 64, 81, 125, 243, 256, 625, 1024, 3125]));
x = 2 3 4 5 y = 2 3 4 5 z = Columns 1 through 8 4 8 9 16 25 27 32 64 Columns 9 through 15 81 125 243 256 625 1024 3125
2   Fail
%% assert(isequal(euler029(4,15),[4 8 9 16 25 27 32 36 49 64 81 100 121 125 128 144 169 196 216 225 243 256 343 512 625 729 1000 1024 1296 1331 1728 2048 2187 2197 2401 2744 3375 4096 6561 8192 10000 14641 16384 19683 20736 28561 32768 38416 50625 59049 65536 177147 262144 531441 1048576 1594323 4194304 4782969 14348907 16777216 67108864 268435456 1073741824]));
Error: Assertion failed.
3   Pass
%% assert(isequal(euler029(10,10),[4,8,9,16,25,27,32,36,49,64,81,100,125,128,216,243,256,343,512,625,729,1000,1024,1296,2187,2401,3125,4096,6561,7776,10000,15625,16384,16807,19683,32768,46656,59049,65536,78125,100000,117649,262144,279936,390625,531441,823543,1000000,1048576,1679616,1953125,2097152,4782969,5764801,9765625,10000000,10077696,16777216,40353607,43046721,60466176,100000000,134217728,282475249,387420489,1000000000,1073741824,3486784401,10000000000]));
x = 2 3 4 5 6 7 8 9 10 y = 2 3 4 5 6 7 8 9 10 z = 1.0e+10 * Columns 1 through 10 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 11 through 20 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 21 through 30 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 31 through 40 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 41 through 50 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 0.0001 0.0001 0.0001 0.0002 Columns 51 through 60 0.0002 0.0002 0.0005 0.0006 0.0010 0.0010 0.0010 0.0017 0.0040 0.0043 Columns 61 through 69 0.0060 0.0100 0.0134 0.0282 0.0387 0.1000 0.1074 0.3487 1.0000
4   Fail
%% a=ceil(rand*80)+2 b=ceil(rand*80)+2 assert(isequal(euler029(a,b),euler029(b,a)))
Error: Assertion failed.
5   Fail
%% assert(isequal(euler029(30,2),[4,8,9,16,25,32,36,49,64,81,100,121,128,144,169,196,225,256,289,324,361,400,441,484,512,529,576,625,676,729,784,841,900,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,134217728,268435456,536870912,1073741824]))
Error: Assertion failed.