일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 정오각형
- 리만합
- 하합
- 시뮬레이션
- algeomath
- 큰 수의 법칙
- 큰수의법칙
- 피타고라스 정리
- 지오지브라
- 파이썬
- 프로젝트 오일러
- java
- counting sunday
- 블록코딩
- 오일러
- 확률실험
- project euler
- 알지오매스
- 재귀함수
- 상합
- 프랙탈
- 이항분포
- python
- 삼각함수의그래프
- 수학탐구
- 몬테카를로
- 제곱근의뜻
- 작도
- 구분구적법
- Geogebra
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