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
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
set xy to x * y
if (xy > sixthMax) then exit repeat
repeat with z from
set halfArea to xy + (x + y) * z
if (halfArea > halfMax) then exit repeat
|