N is a perfect square such that the last six digits of N is of the form AABBCC where A, B and C are distinct base ten digits and A is nonzero.
Find the smallest value of N.
What if C shouldn't be zero?
** AABBCC represents the concatenation of the digits and not their product.
*** For an extra challenge solve this puzzle without using a computer program.