AC under 2 secs

Scanner and System.out.println were too slow.