1
0
forked from kalmar/DALGLI0

02 input fix

This commit is contained in:
Kacper Kruczek 2018-06-29 19:52:23 +02:00
parent d5ffbe9c29
commit e6cdf94fc5

View File

@ -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;
} }