Skip to content

Commit a4fc5f9

Browse files
authored
Update 5.py
1 parent f998388 commit a4fc5f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

9/5.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ def dijkstra(start):
4141
count = 0
4242
# 도달할 수 있는 노드 중에서, 가장 멀리 있는 노드와의 최단 거리
4343
max_distance = 0
44-
for i in distance:
44+
for x in distance:
4545
# 도달할 수 있는 노드인 경우
46-
if i != 1e9:
46+
if x != 1e9:
4747
count += 1
48-
max_distance = max(max_distance, i)
48+
max_distance = max(max_distance, x)
4949

5050
# 시작 노드는 제외해야 하므로 count - 1을 출력합니다.
5151
print(count - 1, max_distance)

0 commit comments

Comments
 (0)