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 |
Tags
- c#
- 냥코 센세
- 합성곱 신경망
- Convolutional Neural Network
- backpropagation
- 역전파법
- 비샤몬당
- 소수
- Autoencoder
- 신경망
- 오토인코더
- 베이지안
- 히토요시
- project euler
- 오일러 프로젝트
- A Neural Algorithm of Artistic Style
- SQL
- 역전파
- neural network
- Python
- 소인수분해
- Gram matrix
- bayesian
- 수달
- 전처리
- mnist
- 자전거 여행
- 딥러닝
- CNN
- deep learning
Archives
- Today
- Total
통계, IT, AI
29. Distinct powers 본문
1. 개요
문제는 이곳에서 확인할 수 있다. 정수 \(a\in[2,100], b\in[2,100]\)에 대하여 \(a^b\)의 개수를 세는 것이 목표이다. 단, 중복은 제외한다.
2. 구현: ver 1.0
loop를 이용하여 구현하되 overflow를 방지하기 위하여 Decimal 내장 모듈을 사용한다.
# -*- coding: utf-8 -*- import decimal as d term_list = [] for a in range(2, 101): for b in range(2,101): term_list.append(d.Decimal(a) ** d.Decimal(b)) print(len(set(term_list)))
답은 9183이다.
'IT > PROJECT_EULER' 카테고리의 다른 글
31. Coin sums (0) | 2017.02.09 |
---|---|
30. Digit fifth powers (0) | 2017.01.31 |
28. Number spiral diagonals (0) | 2017.01.30 |
27. Quadratic primes (0) | 2017.01.29 |
26. Reciprocal cycles (0) | 2017.01.29 |
Comments