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 |
Tags
- 유체역학
- Turbulent
- Blasius
- 프로젝트오일러
- Crank-Nicolson
- Laminar
- Fluids
- 디스크 컨트롤러
- 예제
- FTCS
- Boundary Layers
- programmers
- 파이썬
- 힙
- 우선순위큐
- Navier-Stokes
- 회귀
- Python
- Statistics
- heap
- Finite Difference Method
- Compressible Flow
- 프로그래머스
- python3
- 이중우선순위큐
- 통계학
- Heat Equation
- Fluid Dynamics
- regression
- projecteuler
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 |