here is the link of the problem but i can't understand the form of numbers
https://www.spoj.pl/problems/EASYPROB/
here is the link of the problem but i can't understand the form of numbers
https://www.spoj.pl/problems/EASYPROB/
do u meant that in this binary no.
10001001
the first term (1000) -> the power will be three terms as zeros 2^2+2^1+2^0
and second term (100) -> the power will be two terms as zeros 2^1+2^0
and so on
but here for example
73=2(2(2)+2) +2(2+2(0)) +2(0)
the binary of 73 = 100 100 1
this binary won't help me as i understand
So in decimal we have for example $\displaystyle 12345 = 5\cdot10^0 + 4\cdot10^1 + 3\cdot10^2 + 2\cdot10^3 + 1\cdot10^4$. More symbolically, write an n-digit decimal number as $\displaystyle a_{n-1}a_{n-2}\dots a_1a_0$, then it is equal to $\displaystyle \displaystyle \sum_{k=0}^{n-1} a_k\cdot10^k$.
It is the same in binary, just replace the 10 with 2.