Task: | Tietoverkko |
Sender: | Jellu |
Submission time: | 2021-10-17 22:11:08 +0300 |
Language: | Python3 (CPython3) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | RUNTIME ERROR | 0 |
#2 | RUNTIME ERROR | 0 |
#3 | RUNTIME ERROR | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | RUNTIME ERROR | 0.02 s | 1, 2, 3 | details |
#2 | RUNTIME ERROR | 0.02 s | 2, 3 | details |
#3 | RUNTIME ERROR | 0.02 s | 3 | details |
Code
etaisyydet = {1:10**9 + 1} summa = 0 arvot = {} matkat = {1:"1"} matka_arvot = {1:10**9 + 1} n = int(input()) for i in range(n-1): a,b,x = [int(x) for x in input().split()] etaisyydet[max(a,b)] = x matkat[b] = matkat[a]+str(b) matka_arvot[int(matkat[b])] = min(int(matka_arvot[int(matkat[a])]), x) if a not in arvot: arvot[a] = [] for j in arvot: if str(j) in matkat[b]: kohta = matkat[b][matkat[b].find(str(j))+1] arvo = matka_arvot[int(matkat[b])] for k in arvot[j]: if k[0] != kohta: summa += min(int(k[1:]), arvo) nimi = f"{kohta}{arvo}" arvot[j].append(nimi) summa += arvo print(summa)
Test details
Test 1
Group: 1, 2, 3
Verdict: RUNTIME ERROR
input |
---|
100 1 2 74 1 3 100 2 4 50 3 5 40 ... |
correct output |
---|
88687 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 16, in <module> kohta...
Test 2
Group: 2, 3
Verdict: RUNTIME ERROR
input |
---|
5000 1 2 613084013 1 3 832364259 2 4 411999902 3 5 989696303 ... |
correct output |
---|
1103702320243776 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 16, in <module> kohta...
Test 3
Group: 3
Verdict: RUNTIME ERROR
input |
---|
200000 1 2 613084013 1 3 832364259 2 4 411999902 3 5 989696303 ... |
correct output |
---|
1080549209850010931 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 16, in <module> kohta...