Sort by

recency

|

172 Discussions

|

  • + 0 comments

    For Python3 Platform

    I wrote the code from scratch just to get more practice

    def connectingTowns(n, routes):
        total= 1
        
        for route in routes:
            total *= route
        
        return total % 1234567
    
    t = int(input())
    for _ in range(t):
        n = int(input().strip())
        routes = list(map(int, input().split()))
        
        result = connectingTowns(n, routes)
        
        print(result)
    
  • + 2 comments

    the question takes an ungodly amount of time just to understand

  • + 1 comment
    function connectingTowns(n, routes) {
        // Write your code here
        let product = routes.reduce((prd,val)=> prd * val % 1234567);
        return product;
    }
    
  • + 0 comments

    Thanks for help. Pearl Lemon Facilities Management UK also helps me.

  • + 0 comments

    Thanks for sharing valuable post. Sabexch login