Doubt in recursion challenges-1

My code is running fine in Netbeans but it is showing exception in your editor.

which exception? is it showing NoSuchElementException?
if yes, then you just need to pass all inputs in advance. there is an input window in left lower pane of editor. pass all the inputs in advance to this window before execution.

Thanks