Submit | All submissions | Best solutions | Back to list |
IWGBS - 0110SS |
Dor is IWGolymp student so he has to count in how many ways he can make N digit numbers that is formed by ones and zeroes. But zeroes can not be next to each other. Help to him in how many different numbers can he make.
For example, N = 3: 101, 010, 111, 110, 011
Note: A leading zero is allowed.
Input
A positive integer N (1 <= N <= 10000).
Output
Answer for the problem.
Example
Input: 2 Output: 3
Added by: | Azat Taryhchiyev |
Date: | 2012-02-16 |
Time limit: | 0.100s-3.085s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
hide comments
|
||||||||
2012-02-21 17:39:02 RAJDEEP GUPTA
I assumed that the answer is at most 2100 digits long. |
||||||||
2012-02-20 21:55:56 krabathor
should be moved to tutorial |
||||||||
2012-02-16 14:57:32 Devil D
U need to implement Big Int for this |
||||||||
2012-02-16 14:43:50 Azat Taryhchiyev
No it's a long arithmethic problem |
||||||||
2012-02-16 14:26:05 Aman Kumar
answer duznt fit int long long... |
||||||||
2012-02-16 14:08:16 Aman Kumar
does the answer fit in long long....?? |