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 |
31 |
Tags
- SQL
- 오일러 프로젝트
- A Neural Algorithm of Artistic Style
- 전처리
- c#
- Gram matrix
- project euler
- Python
- 역전파
- 딥러닝
- 히토요시
- neural network
- 냥코 센세
- 베이지안
- deep learning
- Convolutional Neural Network
- 수달
- 비샤몬당
- 역전파법
- 신경망
- 자전거 여행
- 합성곱 신경망
- 오토인코더
- 소수
- CNN
- backpropagation
- Autoencoder
- 소인수분해
- mnist
- bayesian
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 |