Open
Conversation
- 자동차 이름은 쉼표(,)를 기준으로 구분하며 이름은 5자 이하만 가능하다. - 중복된 이름은 허용하지 않는다.
- 시도 횟수는 0 이상의 정수여야 한다. - 음수나 숫자가 아닌 값이 입력되면 예외 처리를 한다.
- 각 자동차는 0부터 9까지의 랜덤 숫자를 생성한다. - 생성된 숫자가 4 이상일 경우 자동차는 한 칸 전진한다. - 생성된 숫자가 4 미만일 경우 자동차는 움직이지 않는다.
- 각 자동차의 현재 위치를 화면에 출력한다. - 이동 결과는 시도 횟수만큼 반복 출력한다.
- 가장 멀리 이동한 자동차가 우승자이다. - 우승자가 여러 명일 경우 쉼표(,)를 이용하여 구분한다.
- 입력과 유효값 검사를 분리
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.