跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F0592. Fibonacci Numbers

  • ID: 598
  • 传统题
  • 1000ms
  • 128MiB
  • 尝试: 0
  • AC · 已通过: 0
  • 教学难度:待分级
  • 上传者:
  • 待分类
  • 整理状态
  • 难度待定
  • 难度
  • 共享题库
  • 高校与竞赛共享题
  • 英文题面
  • 题目来源
  • 题面语言

Fibonacci Numbers

题目描述

A Fibonacci sequence is calculated by adding the previous two members of the sequence, with
the first two members being both 1.
f (1) = 1, f (2) = 1, f (n > 2) = f (n − 1) + f (n − 2)
Your task is to take a number as input, and print that fibonacci number.

输入格式

100

输出格式

354224848179261915075

样例 1

输入

100

输出

354224848179261915075

提示

No generated fibonacci number in excess of 1000 digits will be in the test data, i.e. f (20) = 6765
has 4 digits.


题目来源:19 June, 2011 - Waterloo local contest;FPS 共享题包,题包内第 3 题。保留原作者与原赛事署名。