Given an integer N, the task is to find the smallest power of four greater than or equal to N.
Input: N = 12
24 = 16 which is the next required
greater number after 12.
Input: N = 81
- Find the fourth root of the given n.
- Calculate its floor value using floor() function.
- If n is itself a power of four then return n.
- Else add 1 to the floor value.
- Return the fourth power of that number.
Below is the implementation of the above approach:
- Smallest number greater than or equal to N divisible by K
- Smallest Special Prime which is greater than or equal to a given number
- Minimum element whose n-th power is greater than product of an array of size n
- Smallest divisor D of N such that gcd(D, M) is greater than 1
- Smallest N digit number which is a perfect fourth power
- Highest power of 2 less than or equal to given number
- Smallest number greater or equals to N such that it has no odd positioned bit set
- Minimum number of power terms with sum equal to n
- Smallest integer greater than n such that it consists of digit m exactly k times
- Longest subarray having average greater than or equal to x
- Count number of binary strings such that there is no substring of length greater than or equal to 3 with all 1's
- Smallest Integer to be inserted to have equal sums
- Smallest number k such that the product of digits of k is equal to n
- Check whether all the rotations of a given number is greater than or equal to the given number or not
- Check if given number is a power of d where d is a power of 2
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.