I am trying to solve the secret code of the SPOJ problem, and this is obviously a mathematical problem.
Complete problem
For those who are lazy to go and read, this is so:
a0, a1, a2, ..., an - sequence of N numbers B - a Complex Number (has both real and imaginary components) X = a0 + a1*B + a2*(B^2) + a3*(B^3) + ... + an*(B^n)
So, if you are given B and X, you must find a0, a1, .. an. I donβt know how and where to start, because even N is not known, just X and B.
The problem is not as simple as expressing a number in the base of B, since B is a complex number.
How can this be solved?
source share