There exists a number oddity with 3 different 4-digit numbers. One is 9801, where (98 + 01)^2 = 9801. It also works with 3025: (30+25)^2 = 3025.
What is the other number?
What is the smallest 6-digit number that would work?
(in other words, in a 6-digit number abcdef: abcdef=(abc+def)^2)
hey folks,
before i get started i want to say that this is a very interesting site. I am an aspirng newbie programmer looking for a site to help me keep my logic on point. this site is perfect. to get the answer to this problem i wrote a small program that generates the answer. it took about 7 mins. write. the answer is 494, 209
#include<stdio.h>
main()
{
int x=100;
int y=100;
while (x<999)
{
while (y<999)
{
y++;
if ( ((x+y)*(x+y))==((x*1000)+y))
{
printf("%d,%d\n",x,y);
return 0;
}
}
x++;
y=100;
}
}