Skip to content

Latest commit

 

History

History
3 lines (3 loc) · 393 Bytes

README.md

File metadata and controls

3 lines (3 loc) · 393 Bytes

Stairs_riddle

A simple function for solving the stairs riddle from job interviews: "1000 people are climbing an infinite staircase, all start at 0 and some go up one stair each turn. in each turn are going up only the people that are divisible by the turn number (1,2,3... 2,4,6... 3,6,9...etc) and this continues for 1000 turns. how many people are on stair no.3?" (any n in this function)