일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- python
- 프랙탈
- 블록코딩
- 수학탐구
- 재귀함수
- 정오각형
- Geogebra
- 몬테카를로
- 큰 수의 법칙
- 프로젝트 오일러
- 하합
- 삼각함수의그래프
- 큰수의법칙
- 확률실험
- 상합
- 지오지브라
- counting sunday
- 오일러
- java
- 피타고라스 정리
- 알지오매스
- 제곱근의뜻
- 구분구적법
- project euler
- 파이썬
- 작도
- 이항분포
- 리만합
- algeomath
- 시뮬레이션
Archives
- Today
- Total
이경수 선생님의 수학실험실
Problem 48(Self powers) 본문
Problem 48(Self powers)
The series, \(1^{1}+ 2^{2}+ 3^{3}+ ... + 10^{10}= 10405071317\).
Find the last ten digits of the series, \(1^{1}+ 2^{2}+ 3^{3}+ ... + 1000^{1000}\).
In Python:
import time
def selfpower(n):
product = 1
for i in range(1, n + 1):
product = (product * n) % (10 ** 10)
return product
result = 0
for i in range(1, 1000):
result += selfpower(i)
result = result % (10 ** 10)
print(result)
Run time: 0.15167498588562012 seconds
Solution: 9110846700
'Project Euler' 카테고리의 다른 글
Problem 50(Consecutive prime sum) (0) | 2019.08.18 |
---|---|
Problem 49(Prime permutations) (0) | 2019.08.16 |
Problem 47(Distinct primes factors) (0) | 2019.08.15 |
Problem 46(Goldbach's other conjecture) (0) | 2019.08.15 |
Problem 45(Triangular, pentagonal, and hexagonal) (0) | 2019.08.15 |
Comments