Cody

Solution 1983141

Submitted on 20 Oct 2019 at 8:00
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   Fail
a = ['73167176531330624919225119674426574742355349194934'... '96983520312774506326239578318016984801869478851843'... '85861560789112949495459501737958331952853208805511'... '12540698747158523863050715693290963295227443043557'... '66896648950445244523161731856403098711121722383113'... '62229893423380308135336276614282806444486645238749'... '30358907296290491560440772390713810515859307960866'... '70172427121883998797908792274921901699720888093776'... '65727333001053367881220235421809751254540594752243'... '52584907711670556013604839586446706324415722155397'... '53697817977846174064955149290862569321978468622482'... '83972241375657056057440261407972968652414535100474'... '82166370484403199890058895243450658541227588666881'... '16427171479924442928260863465674813919123162824586'... '17866458359124566529486545682848912883142607690042'... '24219022671055626321191109370544217506941658960408'... '07198403850962455444362981230987879927244284909188'... '84580156166097919133855499200524066689912560717606'... '05886116467109405077541002256983155200055935729725'... '71636269561882670428232483600823267530420752963450'] y_correct = 40824; assert(isequal(euler008(a),y_correct))

Error in solution: Line: 42 Column: 64 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

2   Fail
a = ['73467176531330624919225119674426574742355349194934'... '96953520312774506326239578318016984801869478851843'... '85866560789112949495459501737958331952853208805511'... '12540898747158523863050715693290963295227443043557'... '66896698950445244523161731856403098711121722383113'... '62229890423380308135336276614282806444486645238749'... '30358907896290491560440772390713810515859307960866'... '70172427621883998797908792274921901699720888093776'... '65727333501053367881220235421809751254540594752243'... '52584907511670556013604839586446706324415722155397'... '53697817477846174064955149290862569321978468622482'... '83972241775657056057490261407972968652414535100474'... '82166370984403199890008895243450658541227588666881'... '16427171079924442928230863465674813919123162824586'... '17866458359124566529476545682848912883142607690042'... '24219022671055626321111109370544217506941658960408'... '07198403850962455444362981230987879927244284909188'... '84580156166097919133875499200524063689912560717606'... '05886116467109405077541002256983155200055935729725'... '71636269561882670428252483600823257530420752963450'] a = reshape(a,10,100); a = a'; a = a(:)'; y_correct = 35721; assert(isequal(euler008(a),y_correct))

Error in solution: Line: 42 Column: 64 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

3   Fail
a = ['05886116460109405000541002256983155200055935029025'... '96952652026120060506262622695082618016986080186960'... '85866560089112960960956059501026095826295208805511'... '12560089806001585226862605002629522060602606026550'... '66896698950526161026185660026098011121022268261126'... '62229890608026620661602828066060606086660522680609'... '26026589009156060600002269001268105158592600960866'... '00102602062699809090809220609219016990208880926006'... '65020262626501052626608812202265602180905125226026'... '52586090051160055601266060826958660606006261552690'... '52669081060008606106006609551609290862569266226082'... '82690226060506090261600090296865260160526510060060'... '82166260061998900088952602660506585601220588666881'... '16602010129282260862660656060812691912261628260586'... '10866605826591260566529600658912882616026006900602'... '26021902262626211111092600566021050696016589606008'... '00198600268509626055606060260809920260602860909188'... '86058015616609091912626805605640626689912560010606'... '05886116606010960050005601002251552000559265029025'... '01626626956188260060282526082668260602005296266050'] a = reshape(a,10,100); a = a'; a = a(:)'; y_correct = 31104; assert(isequal(euler008(a),y_correct))

Error in solution: Line: 42 Column: 64 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.