Addition or multiplication ?
Statement
Goal
You must add the digits of each set of numbers separate by "*" and multiply the resultsif string is like : -41*-98
you have to do : (-4 + 1) * (-9 + 8)
Input
String with two sets of numbers separate by "*"
Examples :
-5*6, -8*-9, 89*96, ...
if string is like : -41*-98
you have to do : (-4 + 1) * (-9 + 8)
Examples :
-5*6, -8*-9, 89*96, ...
if string is like : -41*-98
you have to do : (-4 + 1) * (-9 + 8)
Output
The result of the multiplication
Constraints
Example
Input
12*1256
Output
42
Game modes
Reverse
Test cases
Test 1 Test
Input
12*1256
Output
42
Validator 1 Validator
Input
35*2
Output
16
Test 2 Test
Input
-4*8
Output
-32
Validator 2 Validator
Input
-4*8
Output
-32
Test 3 Test
Input
658*965
Output
380
Validator 3 Validator
Input
123456*654321
Output
441
Test 4 Test
Input
69*12
Output
45
Validator 4 Validator
Input
1*1
Output
1
Test 5 Test
Input
-41*-51
Output
12
Validator 5 Validator
Input
-41*-51
Output
12
Solution language
Solution
Stub generator input