8-CA group - Topic 1: Title: Tens square

This will not be repeated by the 10 digits 0 to 9, without missing any, may be composed of a lot of 10 digits.
Which also happens to have a lot of square number (the square of a number).

For example: 1026753849 is the smallest number in a square.

Please find the largest of a number of squares is the number?

Note: You need to submit a 10-digit number, do not fill out any extra content.

Code:

import math
t=int(math.sqrt(9876543210))
while True:
    fang=t*t
    fang=str(fang)
    if( '0' in fang and  '1' in fang and  '2' in fang and  '3' in fang and  '4' in fang and  '5' in fang and  '6' in fang and  '7' in fang and  '8' in fang and  '9' in fang  ):
      print(fang)
      break
    t=t-1    
 

answer:

9814072356

Published 10 original articles · won praise 0 · Views 200

Guess you like

Origin blog.csdn.net/tianrandai12/article/details/104072399