Welcome

首页 / 软件开发 / 数据结构与算法 / UVa 10334 Ray Through Glasses (斐波那契&高精度)

UVa 10334 Ray Through Glasses (斐波那契&高精度)2014-07-1010334 - Ray Through Glasses

Time limit: 3.000 seconds

http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1275

Suppose we put two panes of glass back-to-back. How many ways

are there for light rays to pass through or be reflected after changing direction n times ? Following figure shows the situations when the value of nis 0, 1 and 2.                                  

Input

It is a set of lines with an integer n where 0 <= n <= 1000 in each of them.

Output

For every one of these integers a line containing