Jump to content

O'Halloran numbers: Difference between revisions

m
→‎{{header|AppleScript}}: Further optimisation and updated comment.
m (→‎{{header|AppleScript}}: Another minor optimisation, gleaned from the Phix solution.)
m (→‎{{header|AppleScript}}: Further optimisation and updated comment.)
Line 72:
repeat with x from 1 to sixthMax
repeat with y from x to (sixthMax div x)
repeat with halfArea from ((x * y + x + y) * y) to halfMax by (x + y)
set o's evens's item halfArea to missing value
end repeat
Line 84:
(* Repeat logic condensed from:
repeat with x from 1 to sixthMax
repeat with y from 1x to xsixthMax
set xy to x * y
if (xy > sixthMax) then exit repeat
repeat with z from 1y to ysixthMax
set halfArea to xy + (x + y) * z
if (halfArea > halfMax) then exit repeat
557

edits

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