We are given an array and our task is to check if the elements of the array are present in Fibonacci series or not. Give the count of such numbers in the array.
The first line of input contains an integer T denoting the number of test cases. Each test case contains an integer n which denotes the number of elements in the array a. Next line contains space separated n elements in the array a.
Print an integer which denotes the count of Fibonacci numbers in the array.
4 2 8 5 20 1 40 13 23
1 2 3 4 5
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.