• + 2 comments

    If you're failing all but 1 of the test cases, you more than likely did not implement the modulo described in the instructions. In my opinion this problem would be much better if we didn't have to handle data overflow in such a way. In any case it's only 1 extra line of code:

    var routeCount=1;
    for(int i=0;i<routes.Length;i++){
    	routeCount*=routes[i];
    	routeCount%=1234567;
    }
    return routeCount;