forked from kalmar/DALGLI0
02 input fix
This commit is contained in:
parent
e6cdf94fc5
commit
7d5bd4857e
@ -14,16 +14,16 @@ let n = parseInt(process.argv[2]);
|
|||||||
let p1 = parseArray(process.argv[3]);
|
let p1 = parseArray(process.argv[3]);
|
||||||
let p2 = parseArray(process.argv[4]);
|
let p2 = parseArray(process.argv[4]);
|
||||||
|
|
||||||
let f = new Polynomial.Class(p1);
|
let f = new Polynomial.Class(n, p1);
|
||||||
let g = new Polynomial.Class(p2);
|
let g = new Polynomial.Class(n, p2);
|
||||||
mul = Polynomial.multiply(f, g, 2).coefficients;
|
mul = Polynomial.multiply(f, g).coefficients;
|
||||||
try {
|
try {
|
||||||
div = Polynomial.divide(f, g, 2).coefficients
|
div = Polynomial.divide(f, g).coefficients
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
gcd = Polynomial.gcd(f, g, 2).coefficients;
|
gcd = Polynomial.gcd(f, g).coefficients;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user