题目描述
Check if a given number N is the Fibonacci number. A Fibonacci number is a number that occurs in the Fibonacci series.
Example 1:
Input:
N = 34
Output:
Yes
Explanation:
34 is one of the numbers
of the Fibonacci series.
Example 2:
Input:
N = 41
Output:
No
Explanation:
41 is not in the numbers
of the Fibonacci series.
Your Task:
You don't need to read input or print anything. Your task is to complete the function checkFibonacci() which takes an integer N and returns a string "Yes" if it is a Fibonacci number else "No".
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
Constraints:
1 <= N <= 100
输入格式
见题面
输出格式
见题面
样例输入
N = 34
样例输出
Yes