← RoseCode

ROSECODE 440

Triple pandigital

liuguangxi · Programming ·

Consider a 10-digit pandigital number n in base 10. If we take first and last half of n, two 5-digit numbers x and y are got. Specially, square of x and square of y are also both 10-digit pandigital.

Find all pandigital numbers n satisfying above properties. Note: leading zero is not allowed in any numbers.

Answer format: [count],[sum]
(Sample input: 1,1023456789)