UVa 10862

From Algorithmist
Jump to navigation Jump to search

10862 - Connect the Cable Wires[edit]

Summary[edit]

To find number of ways to connect a center with many houses with cables directly or via houses.

Explanation[edit]

Take paper and pencil and draw all the cable connection possibilities for the first few number of houses. The result should somewhat resemble the Fibonacci Sequence.

Notes[edit]

  • The output for any given case will be at most 900 digits.

Input[edit]

1
2
3
20
0

Output[edit]

1
3
8
102334155