Cody

Solution 1255781

Submitted on 23 Aug 2017 by Alfonso Nieto-Castanon
  • Size: 38
  • This is the leading solution.
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
a='1'; b='1'; y_correct ='2'; assert(isequal(huge_add(a,b),y_correct)); %test 1

2   Pass
a='1'; b='1234'; y_correct ='1235'; assert(isequal(huge_add(a,b),y_correct)); %test 2

3   Pass
a='0'; b='0'; y_correct ='0'; assert(isequal(huge_add(a,b),y_correct)); %test 3

4   Pass
a='-2'; b='12'; y_correct =-1; assert(isequal(huge_add(a,b),y_correct)); %test 4

5   Pass
a='0'; b='12.4'; y_correct =-1; assert(isequal(huge_add(a,b),y_correct)); %test 5

6   Pass
a=[1 2 3 4]; b='1'; y_correct =-1; assert(isequal(huge_add(a,b),y_correct)); %test 6

7   Pass
a='6694977108091595261510290'; b='558600734512249387816266753751395396248' y_correct='558600734512256082793374845346656906538'; assert(isequal(huge_add(a,b),y_correct)); %test 7

b = '558600734512249387816266753751395396248'

8   Pass
a='81284715160230588215396489792659051248405'; b='20581776144'; y_correct='81284715160230588215396489792679633024549'; assert(isequal(huge_add(a,b),y_correct)); %test 8

9   Pass
a='2142314158133481967755465375825639991'; b='975045955705613231195150906272'; y_correct='2142315133179437673368696570976546263'; assert(isequal(huge_add(a,b),y_correct)); %test 9

10   Pass
a='90759574728945088918299242842454189652658088'; b='183491477617019065660787368148586'; y_correct='90759574729128580395916261908114977020806674'; assert(isequal(huge_add(a,b),y_correct)); %test 10

Suggested Problems