First perfect square in base n with n unique digits: Difference between revisions
First perfect square in base n with n unique digits (view source)
Revision as of 21:12, 22 May 2019
, 5 years ago→{{header|Python}}: (removed an unused function)
m (→{{header|Python}}: (docstring edit)) |
m (→{{header|Python}}: (removed an unused function)) |
||
Line 354:
<lang python>'''Perfect squares using every digit in a given base.'''
from math import (ceil, sqrt)▼
from itertools import (count, dropwhile, repeat)
▲from math import (ceil, sqrt)
from time import time
Line 372:
# missingDigitsAtBase :: Int -> [Bool] -> Int -> Bool
def missingDigitsAtBase(base, bools):
'''Fusion of representing the square of integer N at a given base
with checking whether all digits of that base contribute to N^2.
Clears the
True if
'''
def go(x):
Line 439:
wrap(toChr, n, rs)
)
|