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 (labled from 1 to n) now he wanna select a playlist.
in his opinion a good playlist is one that have no two successive tracks.
in how many ways?
first line = number of test cases
each testcase in an integer n(number of tracks)
Output number of good playlists he can make.
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?
"in his opinion a good playlist is one that have no two successive tracks."
easy 1 :)
The tracks in the play list should be in an ascending order only.Do not rearrange them.
Beware :: Spoilers in Comments --__--
real time fabonnici use
too much spoilers in comment
Wrote it in C# but C# is not acceptable for this problem :((
got WA when used a direct formula.But AC with a simple precomputation.Just watch first 4,5 consecutive testcases you'll get it.
Question is bit unclear .