should not close standart input scanner

An execution of scanner.close closes System.in as well, thus next execution of scanner.nextInt throws NoSuchElementException.
To avoid this situation, just leave scanner open.
Merge pull request #2 from TomohikoK/patch-2

should not close standart input scanner