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