Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 772 Bytes

File metadata and controls

31 lines (26 loc) · 772 Bytes

Climbing Stairs

Challenge Description:

You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?

Input sample:

Your program should accept as its first argument a path to a filename. Each line in this file contains a positive integer which is the total number of stairs.
Ignore all empty lines. E.g.

10
20

Output sample:

Print out the number of ways to climb to the top of the staircase. E.g.

89
10946

Constraints:
The total number of stairs is <= 1000