题目描述
Find the Nth term of the Mysterious series.
N Nth term
1 5
2 10
3 26
4 50
5 122
.
.
.
10 842
Example 1:
Input: N = 1
Output: 5
Explanation: First term of the series is 5.
Example 2:
Input: N = 2
Output: 10
Explanation: Second term of the series is 10.
Your Task:
You dont need to read input or print anything. Complete the function nthMysterious() which takes N as input parameter and returns the Nth term of the Mysterious series.
Expected Time Complexity: O(nlogn)
Expected Auxiliary Space: O(n)
Constraints:
1<= N <=10^{3}
输入格式
见题面
输出格式
见题面
样例输入
N = 1
样例输出
5