CODE1 at SPOJ - cannot solve it
Posted
by
VaioIsBorn
on Stack Overflow
See other posts from Stack Overflow
or by VaioIsBorn
Published on 2010-03-16T20:01:17Z
Indexed on
2013/07/01
10:21 UTC
Read the original article
Hit count: 322
I am trying to solve the problem Secret Code on SPOJ, and it's obviously a math problem.
For those who are lazy to go and read, it's like this:
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 should find a0, a1, ..an. I don't know how or where to start, because not even N is known, just X and B.
The problem is not as easy as expressing a number in a base B, because B is a complex number.
How can it be solved?
© Stack Overflow or respective owner