Submit | All submissions | Best solutions | Back to list |
AMZRCK - Amz Rock |
To many people in many cultures, music is an important part of their way of life.
AmzMohammad is a fan of rock music. and he have n rock tracks (labelled from 1 to n) now he wants to select a playlist.
in his opinion a good playlist is one that have no two successive tracks.
in how many ways?
Input
first line = number of test cases
each testcase in an integer n(number of tracks)
Output
Output number of good playlists he can make.
answer is less than 1000000000. it is the only constraint :)
Example
Input: 2 1 2 Output: 2 3
note: a good play list may consist 0 track :)
note 2: how many Persian rock tracks we have?
Added by: | mohammad mahmoodi |
Date: | 2012-08-01 |
Time limit: | 0.100s-1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 GAWK BASH CSHARP GO ICON ICK WHITESPACE |
Resource: | AmzMohammad ( Mohammad Mahmoodi ) |
hide comments
|
|||||||||
2012-08-01 07:11:12 Damian Straszak
Does playlist mean a set or a sequence? |
|||||||||
2012-08-01 07:11:12 Vimal Raj Sharma
What are the constraints ? |