All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Stairway Ascension Ascertainment (Posted on 2023-03-07) Difficulty: 3 of 5
A stairway consists of 100 steps which can be ascended by one step at a time, two steps, three steps or, by four steps.

Determine the total number of ways to ascend the staircase.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution re: Iterative approach | Comment 4 of 6 |
(In reply to Iterative approach by Steve Herman)

Steve Herman's iterative approach agrees with the results obtained from the "base 4 trick".


The solution appears to be 17943803336550012914104102513


f = [1,2,4,8]

for i in range(100):
    if i < 4:
        continue
    f.append(f[i-1]+f[i-2]+f[i-3]+f[i-4])

[1, 2, 4, 8, 15, 29, 56, 108, 208, 401, 773, 1490, 2872, ... , 17943803336550012914104102513]

  Posted by Larry on 2023-03-07 09:42:19
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (9)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information