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?
hide comments
Shashank Tiwari:
2015-12-12 19:03:07
Question is bit unclear .
|
|
prakash_reddy:
2015-08-28 22:36:02
I assumed like this and got AC.....
|
|
Abhinandan Agarwal:
2015-08-27 19:51:29
Remove spoilers .. |
|
Babu:
2015-08-18 11:18:54
real life implementation of fibo !! thanks @Himanshu and @pika_pika |
|
anuveshkothari:
2015-08-09 15:55:29
@piyush comment helps..
|
|
Piyush Kumar:
2015-06-14 16:31:22
If it is of any help , n (number of tracks) is less than 45. :) Last edit: 2015-06-14 16:32:28 |
|
[Mayank Pratap]:
2015-05-24 04:42:55
Good problem for newbies like me!!! |
|
Maroof:
2015-05-14 08:51:51
Don't use dynamic array in C++ :p it gives error |
|
Sahil Dua:
2014-10-24 11:18:01
0.00 AC with easy DP.
|
|
ayush:
2014-06-05 09:41:36
elegant but don't read the comments they give it away |
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 ) |