+ 1

Code coach Mathematics problem with java

Fail to pass Case 4 👇👇 https://code.sololearn.com/cAw9caqj6Lx5/?ref=app

14th Jun 2022, 5:53 PM
Otman AFOUFOU
Otman AFOUFOU - avatar
6 Answers
+ 2
Otman AFOUFOU No it is giving exception. Just try in your shared code.
15th Jun 2022, 7:03 AM
A͢J
A͢J - avatar
+ 2
"Input Format: Two inputs: an integer and a space separated string of math expressions." a mathematical expression does not necessarily have parentheses and positive integers. There can be more than one pair of parentheses in an expression (I guess)
15th Jun 2022, 11:43 PM
zemiak
+ 1
Otman AFOUFOU Try this input and see what happens 17 (5 + 12) (88 + 22) (6 - 2)
15th Jun 2022, 4:08 AM
A͢J
A͢J - avatar
+ 1
It gave me index 0
15th Jun 2022, 6:11 AM
Otman AFOUFOU
Otman AFOUFOU - avatar
+ 1
In the code coach there is not a space character inside the parentheses Try without space inside just one between the expressions
15th Jun 2022, 8:35 AM
Otman AFOUFOU
Otman AFOUFOU - avatar
+ 1
Otman AFOUFOU Space doesn't matter after or before the operator. Compiler ignore this type of space because it is just for readability purpose. Still giving me same exception. Did you pass all test cases?
15th Jun 2022, 10:36 AM
A͢J
A͢J - avatar