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
- Python
- Compressible Flow
- Crank-Nicolson
- FTCS
- Fluids
- 이중우선순위큐
- Boundary Layers
- 파이썬
- Fluid Dynamics
- Statistics
- 우선순위큐
- 유체역학
- regression
- Heat Equation
- 디스크 컨트롤러
- Finite Difference Method
- 통계학
- projecteuler
- programmers
- python3
- Navier-Stokes
- 회귀
- Turbulent
- 프로그래머스
- 프로젝트오일러
- Blasius
- 힙
- Laminar
- 예제
- heap
Archives
- Today
- Total
Sudal's Garage
Project Euler 15 본문
Question:
Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.
How many such routes are there through a 20×20 grid?
문제:
2×2 격자가 있을 때, 왼쪽 상단 꼭지점으로부터 시작해서 오른쪽과 아래로만 움직여서 오른쪽 하단 꼭지점까지 가는 경로는 정확히 6개 존재한다.
그렇다면 20×20 격자에서는 몇 개의 경로가 존재할까?
Solution:
1 2 3 4 5 6 | from sympy.functions.combinatorial.numbers import nC N = 20 a=list() for i in range(N*2): a.append(i) print(nC(a,N)) | cs |
'Programming > Project Euler - python' 카테고리의 다른 글
Project Euler 17 (0) | 2019.03.05 |
---|---|
Project Euler 16 (0) | 2019.03.04 |
Project Euler 14 (0) | 2019.03.02 |
Project Euler 13 (0) | 2019.02.28 |
Project Euler 12 (0) | 2019.02.27 |