electicode
Bosh sahifaKurslarResurslarMasalalarMilliy olimpiadaMusobaqalarReyting
...

Bee

Vaqt limiti: 1000msXotira limiti: 256MB
Barcha yechimlar

Masala tavsifi

Imagine a honeycomb — a field of hexagonal cells with side length NNN. In the upper-left cell AAA there is a bee. In one move it can crawl to the cell down, to the cell down-right, or to the cell up-right (the bee does not crawl up or left). It is required to write a program that finds the number of ways in which the bee can crawl from cell AAA to the opposite cell BBB.

bee.png

Input Format

The first line contains a single number NNN — the size of the hexagonal field (2≤N≤12)(2 \le N \le 12)(2≤N≤12).

Output Format

Output a single integer — the number of ways.

Misollar

Misol 1
Kirish
2
Chiqish
11
Misol 2
Kirish
3
Chiqish
291

© 2026 Electicode. All rights reserved.