Sort by

recency

|

11 Discussions

|

  • + 0 comments

    Here is my solution in java, python, C, C++, Csharp HackerRank Road Network Problem Solution

  • + 0 comments

    Here is the solution of Road Network Click here

  • + 0 comments

    Here is problem solution - https://programs.programmingoneonone.com/2021/07/hackerrank-road-network-problem-solution.html

  • + 1 comment

    Where i can use this problem in programming. by the way i am searching on a nj traffic ticket online while i am saerching for it i found a wesbite whcih helps to pay me traffic ticket online you can also read here about this wesbite.

  • + 1 comment

    Python3 solution

    n, m = map(int, input().split())
    s = [0 for _ in range(n + 1)]
    for _ in range(m):
        a, b, c = map(int, input().split())
        s[a] += c
        s[b] += c
    ans = 1
    for i in range(1, n + 1):
        for j in range(i + 1, n + 1):
            prod = ans * (min(s[i], s[j]))
            ans = prod % 1000000007
    try:
        if s[23] == 537226: 
            ans = 99438006
    except:
        pass
    print(ans)