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's wrong with this code?
static int connectingTowns(int n, int[] routes) {
int mul=1;
for(int i = 0;i<n-1;i++){
if(routes[i]==1)
continue;
else
mul*=routes[i];
}
return mul%1234567;
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Connecting Towns
You are viewing a single comment's thread. Return to all comments →
what's wrong with this code?
static int connectingTowns(int n, int[] routes) { int mul=1; for(int i = 0;i<n-1;i++){ if(routes[i]==1) continue; else mul*=routes[i]; } return mul%1234567; }