Skip to content

[파랑] 8주차 과제 제출 #265

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

summerlunaa
Copy link
Collaborator

2694 푼 사람 왜 아무도 없죠.
시간초과 뜨는데 해결 방법을 모르겠어요 선생님들.
여튼 레벨 3 수고하셨습니다. 케이 thanks.

@summerlunaa summerlunaa requested a review from kth990303 August 20, 2022 14:35
@summerlunaa summerlunaa self-assigned this Aug 20, 2022
Copy link
Member

@kth990303 kth990303 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 +15 to +18
for i in range(1, m + 1):
start = sum(array[:i])
now_sum = 0
flag = True
Copy link
Member

Choose a reason for hiding this comment

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

모든 M개에 대해서 다 체크해볼 필요가 있을까요?

힌트 1. 각 구간의 합은 수열의 합으로 나누어떨어져야한다.
힌트 1-1. 각 구간의 합은 수열의 합의 약수이다.

Comment on lines +20 to +26
for j in range(i, m):
now_sum += array[j]
if now_sum > start:
flag = False
break
elif now_sum == start:
now_sum = 0
Copy link
Member

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants