You are viewing a single comment's thread. Return to all comments →
In java 8, with a return type of int, some of the test cases return impossible values.
For example, in test case 'input11.txt' the first line is stated to return 4999350028.
This is an impossible value in java 8 for an int (a compiler would complain .. 'The literal 4999350028 of type int is out of range' )
(aside: How is the test even running in java 8?)
The actual value returned wraps the int - and hence fails the test.
Redefining the return type to long would give the correct answer, but fails to compile.