일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- includepdf
- homogeneous linear system
- python
- 빅세타
- Big-O 예제
- trivial solution
- Big Omega
- nontrivial solution
- 재귀함수
- matrix fo a linear transformation
- 코틀린 Hello World!
- 빅오 표기법
- 페이지 겹칩
- nonhomogeneous linear system
- 알고리즘 분석의 실례
- NumPy
- 코틀린 시작하기
- 배열 섞기
- Big Theta
- 랜덤 순서 배열
- Big-Oh 예제
- linear dependence
- 빅오메가
- Big-Oh notation
- 일차변환
- matrix trnasformations
- one-to-one
- 이진 탐색
- recursive algorithms
- itertools
- Today
- Total
코딩 연습
프로젝트 오일러 133번 본문
A number consisting entirely of ones is called a repunit. We shall define
R(k) to be a repunit of length k; for example, R(6)=111111.
Let us consider repunits of the form R(10n).
Although R(10),R(100), or R(1000) are not divisible by 17, R(10000) is divisible by 17. Yet there is no value of n for which R(10n) will divide by 19. In fact, it is remarkable that 11,17,41, and 73 are the only four primes below one-hundred that can be a factor of R(10n).
Find the sum of all the primes below one-hundred thousand that will never be a factor of R(10n).
1 들로만 이루어진 수를 repunit 이라고 한다. R(k) 를 k 개의 1 로 이루어진 수라고 하자. 예를 들어, R(6)=111111 이다.
이제 R(10n) 을 생각해 보자.
R(10),R(100),R(1000) 은 17 로 나누어 떨어지지 않는 반면, R(10000) 은 17 로 나누어 떨어진다. 19 의 경우는 R(10n) 이 19 로 나누어 떨어지는 자연수 n 이 존재하지 않는다. 사실 R(10n) 의 소인수가 되는 100 미만의 소수는 11,17,41.73 의 단 네 개 뿐이다.
R(10n) 의 소인수가 되지 않는 105 미만의 모든 소수들의 합을 구하시오.
이 문제는 132번 문제를 풀고 왔다면 바로 해결할 수 있다.
'project euler with python' 카테고리의 다른 글
프로젝트 오일러 135번 (0) | 2016.03.15 |
---|---|
프로젝트 오일러 134번 (0) | 2016.03.15 |
프로젝트 오일러 132번 (0) | 2016.03.15 |
프로젝트 오일러 131번 (0) | 2016.03.15 |
프로젝트 오일러 130번 (0) | 2016.03.15 |