No.786 Kyoto University Past Exam Problem
Problem Statement
There is a long staircase of N steps on the way to Ohashi Technical College.
Y, a club member aiming for a top-tier university, is going to make his way to Ohashi Technical College following the rule below.
[Rule]
With each stride, climb either 1 step or 2 steps of the staircase.
However, climbing 2 steps in one stride must not occur consecutively.
(2019/02/08 21:47 This condition has been removed. We apologize.)
How many ways are there to climb the staircase of N steps?
Input
N
The input consists of only one line.
N represents the number of lines given as input. (1≦N≦50)
Output
The output consists of one line.
For each input, output the integer that is the answer.
Sample
Sample 1
Input
3
Output
3
Sample 2
Input
9
Output
55
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
kyamatsu
はむこ