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
- 유체역학
- heap
- Crank-Nicolson
- 파이썬
- Finite Difference Method
- regression
- Boundary Layers
- Heat Equation
- 우선순위큐
- 통계학
- Compressible Flow
- 예제
- 디스크 컨트롤러
- Turbulent
- Python
- Navier-Stokes
- python3
- programmers
- Laminar
- 회귀
- projecteuler
- 프로젝트오일러
- FTCS
- Fluid Dynamics
- 힙
- Statistics
- Blasius
- 이중우선순위큐
- 프로그래머스
- Fluids
Archives
- Today
- Total
Sudal's Garage
Project Euler 16 본문
Question:
215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
What is the sum of the digits of the number 21000?
문제:
215 = 32768 은 32768 이고, 자릿수를 모두 더하면 3 + 2 + 7 + 6 + 8 = 26 이다.
그렇다면 21000의 자릿수를 모두 더한 값은 무엇인가?
Solution:
print(eval('+'.join(list(str(2 ** 1000)))))
eval: 문자열을 바로 compute 해준다
'Programming > Project Euler - python' 카테고리의 다른 글
Project Euler 18 (0) | 2019.03.06 |
---|---|
Project Euler 17 (0) | 2019.03.05 |
Project Euler 15 (0) | 2019.03.03 |
Project Euler 14 (0) | 2019.03.02 |
Project Euler 13 (0) | 2019.02.28 |