Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[그리디] 9월 27일 #5

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

[그리디] 9월 27일 #5

wants to merge 4 commits into from

Conversation

kimeunsom
Copy link
Collaborator

@kimeunsom kimeunsom commented Sep 27, 2023

###인적 사항
학번 : 2271018
이름 : 김은솜
<\br>

###과제 제출
기존 제출 : 17451, 1213
추가 제출 : 18111
<\br>

Copy link

@chae-jpg chae-jpg left a comment

Choose a reason for hiding this comment

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

[그리디 알고리즘 코드 리뷰 완료]

1213(P3), 17451(P3)

안녕하세요 은솜님! 코드 리뷰 및 추가제출 확인 완료되었습니다👍
주석 처리도 좋고, 문제도 깔끔하게 잘 풀어주셨어요!
몇 가지 사소한 코멘트 남겼습니다.
궁금하신 점이 있다면 리뷰어를 호출해주세요!

alpha[idx]++;
}

int isOne = 0; //홀수개 알파벳 개수 담을 변수
Copy link

Choose a reason for hiding this comment

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

P3
알튜비튜에서는 변수명에는 스네이크 표기법을 사용하고 있어요! is_one과 같은 이름은 어떨까요?

{
for (int i = 0; i < alpha.size(); i++) {
for (int r = 0; r < alpha[i] / 2; r++) {
sb += (char)(i + 'A');
Copy link

Choose a reason for hiding this comment

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

P3
char 없이도 문자형으로 잘 들어갑니다!

Comment on lines +29 to +31
if (isOne > 1) {
answer += "I'm Sorry Hansoo";
}
Copy link

Choose a reason for hiding this comment

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

팰린드롬을 만들 수 없는 조건을 잘 발견해주셨네요!👍

Comment on lines +24 to +32
for (int i = n - 2; i >= 0; i--) {
if (velocity < planet[i]) { //필요한 속도보다 작은 경우
velocity = planet[i];
}
//배수 아니면, 양의 배수로 만들면서 앞으로 진행!
else if (planet[i] < velocity && velocity % planet[i] != 0) {
velocity = ((velocity / planet[i]) + 1) * planet[i];
}
}
Copy link

Choose a reason for hiding this comment

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

최소 속도를 만드는 조건을 파악해서 문제를 잘 풀어주셨네요!👍

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.

2 participants