Skip to content

Conversation

@Taeyong98
Copy link
Collaborator

No description provided.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 배열은 사용된 적 없는데 안지우신 것 같아요!
사용자 입력을 받는 INPUT 주석과 OUTPUT 주석을 구성하시면 백준에서 문제를 풀때 가독성도 좋고 이렇게 까먹고 안지운 코드를 체크하기에도 편할 것 같습니다~

Copy link
Contributor

@pq5910 pq5910 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

파이팅~~

Comment on lines +8 to +10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

다른 문제에서는 StringBuilder를 사용하셨고, 이 문제에서는 String을 사용하셔서 한번 찾아보았는데, String 변수를 사용하면 가독성은 좋지만 문자를 추가할 때 마다 새로운 문자열을 생성하기 때문에 성능 면에서 좋지 않다고 해요! 참고하시면 좋을 것 같아요. 그래도 확실히 가독성은 좋은 것 같아요:)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저는 처음에 공부하기 전에 당연하게 바로 print를 했었는데 확실히 이 방법보다는 좋은 것 같아요. c++에서는 입출력을 계속해서 반복하면 성능이 많이 떨어진다고 배웠거든요!(java에서도 비슷할거라고 생각합니다...ㅎㅎ) 문자열에 추가하는 것도 확실히 좋은 방법이라고 생각합니다;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전체적으로 깔끔하고 가독성 좋은 코드인 것 같습니다! 아래 쪽 공백 정리.. 하는게 제 취향입니다..ㅎㅎ

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

별찍기-7에서 리뷰한 것과 동일한 내용입니다!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n을 입력 받은 후 scanner.close가 빠진 것 같아요. scanner.close가 없으면 성능 저하, 메모리 누수 등 여러가지 문제점이 있으니 이 문장 아래에 scanner.close가 삽입되면 좋을 것 같아요!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

별찍기-7에서 말씀드린내용과 동일한 내용이에요!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scanner.close가 빠진 것 같아요. 이전 문제에서 말씀 드린 것과 같은 내용이에요.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scanner.close 추가하면 좋을 것 같습니다!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scanner.close 추가되면 좋을 것 같습니다!

@lee-JunR lee-JunR merged commit 072898f into lee-JunR:main May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants