Cody

Problem 43619. Divide polynomial p1 by p2.

Solution 1030614

Submitted on 25 Oct 2016 by uu tsi
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
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}