1
0
forked from kalmar/DALGLI0

class added

This commit is contained in:
Hubert Tylkowski 2018-06-25 19:27:24 +02:00
parent 744f9793c5
commit 7522756ff9
5 changed files with 4 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@ -8,9 +8,11 @@ public class Main {
//ex input in run console : 2 "1 1 1 0 1" "0 1 1"
int n = Integer.parseInt(args[0]);
List<Integer> firstPolynomial = new ArrayList<>();
Arrays.asList(args[1].split("\\s* \\s*")).forEach(factor -> firstPolynomial.add(Integer.valueOf(factor)));
args[1] = args[1].substring(1, args[1].length()-1);
args[2] = args[2].substring(1, args[2].length()-1);
Arrays.asList(args[1].split( ",\\s*" )).forEach(factor -> firstPolynomial.add(Integer.valueOf(factor)));
List<Integer> secondPolynomial = new ArrayList<>();
Arrays.asList(args[2].split("\\s* \\s*")).forEach(factor -> secondPolynomial.add(Integer.valueOf(factor)));
Arrays.asList(args[2].split(",\\s*" )).forEach(factor -> secondPolynomial.add(Integer.valueOf(factor)));
PolynomialTask polynomialTask = new PolynomialTask(n, firstPolynomial, secondPolynomial);
polynomialTask.printAllValuesToStandardOutput();
}