Broken compiler


I am getting correct results when i run same test cases in my intellij. But here for some test cases it shows wrong number (usually by 1 more than it should be)


It might be because you are using some global variable(s) in your code which are not getting properly initialized.
If multiple test cases are checked on your code and global variable(s) are not initialized with zero/null, then previous value/garbage value will be used.