Code is not accepting inputs on coding blocks ide, it is working perfect on any other compiler
Static scanner will give error , dont use scanner as parameter or multiple Scanners , ( works fine on Eclipse But NoSuchElementException is found on online judge )
there’s no benefit to creating more than one Scanner object. It’s simply reading input from a stream, and having more than one reference to that stream isn’t necessary or beneficial to your operations.
just define 1 and use it