Hi,here is another interesting problem that will make you think.
The tower of happiness is located in the garden of effort.Happiness is waiting for you in the top chamber of the tower.The stairs that lead you to the chamber has N steps and you are allowed to climb up one or two steps from your current location. The door of the chamber will open only if you could climb secrt combination. Of course, finding this secret combination is a matter of chance. For instance, you may choose one of three step stairs: 0 1 2 3,or 0 2 3 or 0 1 3.
sample input: 3
sample output: 3
Tahir33 0 Newbie Poster
mrnutty 761 Senior Poster
stevanity 4 Posting Whiz in Training
Tahir33 0 Newbie Poster
Tahir33 0 Newbie Poster
stevanity 4 Posting Whiz in Training
Tahir33 0 Newbie Poster
kes166 37 Practically a Master Poster
Tahir33 0 Newbie Poster
kes166 37 Practically a Master Poster
Tahir33 0 Newbie Poster
kes166 37 Practically a Master Poster
Tahir33 0 Newbie Poster
kes166 commented: You are obviously attempting to troll +0
Tahir33 0 Newbie Poster
rpdm 4 Newbie Poster
Tahir33 0 Newbie Poster
rpdm 4 Newbie Poster
kes166 37 Practically a Master Poster
Tahir33 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.