Saturday, June 25, 2016

Hackerrank common sample code snipets

1. reading input

Scanner in = new Scanner(System.in);
int n = in.nextInt();
in.nextLine();//read rest of line. finish current line's reading
String[] ss = new String[n];
for(int i=0;i
    s[i] = in.next();

No comments: