거리 합 구하기
Time Limit: 2 SecMemory Limit: 1024 MiB
Example Input 1
4
1 2 1
2 3 2
3 4 4
Example Output 1
11
9
9
17
Example Input 2
7
1 2 5
1 3 2
1 4 8
3 5 4
3 6 1
4 7 6
Example Output 2
38
63
40
62
60
45
92
Language-Specific Restrictions
© 2023-2025. All rights reserved.
Powered by @Rn
logo