Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 비샤몬당
- 소수
- 역전파법
- CNN
- mnist
- 오토인코더
- 역전파
- Convolutional Neural Network
- 딥러닝
- 전처리
- project euler
- 자전거 여행
- 오일러 프로젝트
- 합성곱 신경망
- 냥코 센세
- backpropagation
- 베이지안
- c#
- 히토요시
- Python
- Gram matrix
- deep learning
- A Neural Algorithm of Artistic Style
- Autoencoder
- 신경망
- 수달
- bayesian
- 소인수분해
- SQL
- neural network
Archives
- Today
- Total
통계, IT, AI
34. Digit factorials 본문
1. 개요
문제는 이곳에서 확인할 수 있다. 어떤 수는 각 자리의 factorial의 합으로 나타낼 수 있다. 예를 들면,
2. 구현
문제에 조건에 의하여 검사해야 할 숫자에는 상한선이 있다. 즉,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # -*- coding: utf-8 -*- import math as m n = 1 fact_9 = m.factorial( 9 ) while 10 * * (n - 1 ) < fact_9 * n: n + = 1 answer = 0 for i in range ( 10 , fact_9 * n): if sum (m.factorial( int (j)) for j in str (i)) = = i: print (i) answer + = i print ( 'ANSWER: ' , answer) |
답은 40730이다.
'IT > PROJECT_EULER' 카테고리의 다른 글
36. Double-base palindromes (0) | 2017.04.09 |
---|---|
35. Circular primes (0) | 2017.03.19 |
33. Digit cancelling fractions (0) | 2017.03.01 |
32. Pandigital products (0) | 2017.02.26 |
31. Coin sums (0) | 2017.02.09 |