Given a function, Y = (X^6 + X^2 + 9894845) % 971 for a given value. The task is to find the value of the function.
Input: x = 5 Output: 469 Input: x = 654654 Output: 450
Y = (X^6 + X^2 + 9894845) % 971.
If we break down the equation we get Y = (X^6)%971 + (X^2)%971 +(9894845)%971
and we can reduce the eqution to Y=(X^6)%971 + (X^2)%971 + 355.
Below is the required implementation:
- Find number from given list for which value of the function is closest to A
- Find ceil of a/b without using ceil() function
- Find the value of max(f(x)) - min(f(x)) for a given F(x)
- Find (1^n + 2^n + 3^n + 4^n) mod 5 | Set 2
- Find 2^(2^A) % B
- Find value of (n^1 + n^2 + n^3 + n^4) mod 5 for given n
- Find value of (1^n + 2^n + 3^n + 4^n ) mod 5
- Find the value of f(n) / f(r) * f(n-r)
- p5.js | arc() Function
- Find any pair with given GCD and LCM
- Find the sum of series 3, 7, 13, 21, 31....
- Find the sum of the series 2, 5, 13, 35, 97...
- Find (a^b)%m where 'b' is very large
- Find two numbers whose sum and GCD are given
- Find sum of the series 1-2+3-4+5-6+7.......
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.