If you think you've solved it, or if you're stuck, email pi3challenge@sheffield.ac.uk or tweet to @pi3challenge A square number is one that can be written as the square of another number. For example, 9 is a square number, because 9 = 32 = 3 x 3. An example of a number with all the digits once only is 9586714230. But this is not a square number. An example of a number with all the digits once only which is also a square number is 1532487609 = 391472. Hint #1 : Whereas Challenge #1 needed some subtle mathematical reasoning, this challenge just needs your programming skills. Hint #2 : The str , set , and len functions are very useful for this problem. Take a look at this page on lists, strings and sets. Find out how a number can be turned into a string which can then be turned into a list or set. Extra challenges:
|
Mini-Challenges >