Skip to content

[week 7] 주간 결산_연서 #22

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 6 commits into
base: main
Choose a base branch
from
Open

[week 7] 주간 결산_연서 #22

wants to merge 6 commits into from

Conversation

Yeonseo-Jo
Copy link
Member

✨ 이번주 문제 풀이

level 1

level 2


📚 이번주 코테 공부 중 느낀점 / 배운 점

소수 찾기

  • 에라토스테네스의 체
1) 2부터 구하구자 하는 모든 수 나열
2) 2는 소수이므로 오른쪽에 2쓴다.
3) 자신을 제외한 2의 배수 모두 지운다.
4) 남은 수 가운데 3은 소수이므로 오른쪽에 쓴다.
5) 자신을 제외한 3의 배수 모두 지운다.
6) 남은 수 가운데 5은 소수이므로 오른쪽에 쓴다.
7) 자신을 제외한 5의 배수 모두 지운다.
8) 남은 수 가운데 7은 소수이므로 오른쪽에 쓴다.
9) 자신을 제외한 7의 배수 모두 지운다.
10) 위의 과정 반복하면 구하는 구간의 모든 소수가 남는다.

요약 :
-> 1보다 큰 모든 자연수는 소수의 곱으로 이루어져 있다.
-> 자연수 n이 √n보다 작은 소수들로 나눠떨어지지 않으면 자연수 n은 소수이다.

@Yeonseo-Jo Yeonseo-Jo self-assigned this Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant