Cody

Solution 1044076

Submitted on 4 Nov 2016 by Ahmad Alzahrani
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
p1=[3 2 5 1 0 2 ] p2=[1 2 0 5 0 3] q_correct=[3] r_correct=[0 -4 5 -14 0 -7] [q,r]=DivPol(p1,p2) assert(isequal(q,q_correct)) assert(isequal(r,r_correct))

p1 = 3 2 5 1 0 2 p2 = 1 2 0 5 0 3 q_correct = 3 r_correct = 0 -4 5 -14 0 -7 q = 3 r = 0 -4 5 -14 0 -7

2   Pass
p1=[-2 0 3 -5 -6 5 -1 0 16 8] p2=[1 0 -1 2 4] q_correct=[-2 0 1 -1 3 2] r_correct=[0 0 0 0 0 0 0 0 0 0] [q,r]=DivPol(p1,p2) assert(isequal(q,q_correct)) assert(isequal(r,r_correct))

p1 = -2 0 3 -5 -6 5 -1 0 16 8 p2 = 1 0 -1 2 4 q_correct = -2 0 1 -1 3 2 r_correct = 0 0 0 0 0 0 0 0 0 0 q = -2 0 1 -1 3 2 r = 0 0 0 0 0 0 0 0 0 0