forked from kalmar/DALGLI0
class added
This commit is contained in:
parent
744f9793c5
commit
7522756ff9
BIN
02-Wielomiany/out/production/DivisionErrorException.class
Normal file
BIN
02-Wielomiany/out/production/DivisionErrorException.class
Normal file
Binary file not shown.
BIN
02-Wielomiany/out/production/Main.class
Normal file
BIN
02-Wielomiany/out/production/Main.class
Normal file
Binary file not shown.
BIN
02-Wielomiany/out/production/MultiplierNotFoundException.class
Normal file
BIN
02-Wielomiany/out/production/MultiplierNotFoundException.class
Normal file
Binary file not shown.
BIN
02-Wielomiany/out/production/PolynomialTask.class
Normal file
BIN
02-Wielomiany/out/production/PolynomialTask.class
Normal file
Binary file not shown.
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user