Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
kimseonggyu03 committed Feb 13, 2025
1 parent 4ef52ec commit a660e9f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/racingcar/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# 난수 생성 범위의 최대값
RANDOM_MAX = 9


def get_car_names():
names = input("경주할 자동차 이름을 입력하세요. (이름은 쉼표로 구분)\n").split(",")
names = [name.strip() for name in names]
Expand Down Expand Up @@ -40,13 +39,12 @@ def run_race(cars, attempts):
for car, progress in results.items():
print(f"{car} : {progress}")
print()

return results

def get_winners(results):
max_distance = max(len(progress) for progress in results.values())
return [
car for car, progress in results.items()
car for car, progress in results.items()
if len(progress) == max_distance
]

Expand Down

0 comments on commit a660e9f

Please sign in to comment.