X is positive integer of the form pqpqpqrq, such that (X-1) is a perfect square;
where p, q and r different digits from 0 to 9, with p being nonzero.
Determine X
|
~ Б0ЯИ Τ0 С0δЭ ~
|
![]() |
| 16Sep2009,19:16 | #2 |
|
Possible solutions ::
45454565 82828202
|
|
~ Б0ЯИ Τ0 С0δЭ ~
|
![]() |
| 16Sep2009,19:19 | #3 |
|
Brute-force solution :
Code: CPP
Output :: Code:
p=4 q=5 r=6 X=45454565 X-1=45454564 sqrt(X-1)=6742 p=8 q=2 r=0 X=82828202 X-1=82828201 sqrt(X-1)=9101 Process returned 0 (0x0) execution time : 0.031 s |
|
Go4Expert Founder
|
![]() |
| 17Sep2009,13:21 | #4 |
|
I knew not many would attempt on this one. Congrats SP
naimish, SaswatPadhi
likes this
|
|
~ Б0ЯИ Τ0 С0δЭ ~
|
![]() |
| 17Sep2009,18:26 | #5 |
|
Thanx
|

