問題一覧 > 通常問題

No.786 Kyoto University Past Exam Problem

レベル : / AI推定難易度 : 167 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 414
作問者 : kyamatsu / テスター : はむこ
お気に入りにしたユーザー ProblemId : 1589 / 自分の提出
問題文最終更新日: 2019-02-08 21:48:04
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 205 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。