We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
What do you mean by, they don't expect that.
c=in.nextInt();
lets you continue to the next test case normally.
If your code works on all the other test cases normally, then all you have to do is this :
[JavaCode]
if( arrSize ==1){
//you must add this line
int c = in.nextInt(); //currentInput.
System.out.println("YES");
continue; //Continue to the next test case.
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Array
You are viewing a single comment's thread. Return to all comments →
What do you mean by, they don't expect that. c=in.nextInt(); lets you continue to the next test case normally. If your code works on all the other test cases normally, then all you have to do is this :
[JavaCode]