forked from kalmar/DALGLI0
02 input fix
This commit is contained in:
parent
d5ffbe9c29
commit
e6cdf94fc5
@ -2,10 +2,11 @@ let Polynomial = require('./polynomial.js');
|
|||||||
let mul, div, gcd;
|
let mul, div, gcd;
|
||||||
|
|
||||||
function parseArray(x) {
|
function parseArray(x) {
|
||||||
|
let stringResult = "";
|
||||||
result = Array.from(x).filter(x => {
|
result = Array.from(x).filter(x => {
|
||||||
if (x == ' ' || x == '[' || x == ']' || x == ',') return false;
|
if (x == ' ' || x == '[' || x == ']') return false;
|
||||||
else return true;
|
else return true;
|
||||||
}).map(x => parseInt(x));
|
}).join('').split(',').map(x => parseInt(x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user