Jump to content

Penholodigital squares: Difference between revisions

→‎{{header|Wren}}: Added a minimum starting value for the search.
(→‎{{header|Raku}}: prepend Free Pascal Version)
(→‎{{header|Wren}}: Added a minimum starting value for the search.)
Line 474:
for (d in 1...b) master = master * primes[d-1]
var phd = []
var min = Conv.atoi(digits[0..(b-2)].join(), b).sqrt.ceil
var max = Conv.atoi(digits[(b-2)..0].join(), b).sqrt.floor
for (i in 1min..max) {
var sq = i * i
if (b == 10 && (sq % 3) != 0) continue
9,482

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.