02 input fix

This commit is contained in:
Kacper Kruczek 2018-07-01 11:35:34 +02:00
parent e6cdf94fc5
commit 7d5bd4857e

View File

@ -14,16 +14,16 @@ let n = parseInt(process.argv[2]);
let p1 = parseArray(process.argv[3]);
let p2 = parseArray(process.argv[4]);
let f = new Polynomial.Class(p1);
let g = new Polynomial.Class(p2);
mul = Polynomial.multiply(f, g, 2).coefficients;
let f = new Polynomial.Class(n, p1);
let g = new Polynomial.Class(n, p2);
mul = Polynomial.multiply(f, g).coefficients;
try {
div = Polynomial.divide(f, g, 2).coefficients
div = Polynomial.divide(f, g).coefficients
} catch (e) {
console.log(e)
}
try {
gcd = Polynomial.gcd(f, g, 2).coefficients;
gcd = Polynomial.gcd(f, g).coefficients;
} catch (e) {
console.log(e);
}