O'Halloran numbers: Difference between revisions
m
→{{header|AppleScript}}: Minor optimisation.
(Added AppleScript.) |
m (→{{header|AppleScript}}: Minor optimisation.) |
||
Line 69:
end repeat
set halfMax to max div 2
set
repeat with x from 1 to
repeat with y from 1 to (
repeat with halfArea from (x * y + x + y) to halfMax by (x + y)
set o's evens's item halfArea to missing value
Line 80:
end OHalloranNumbers
(* Repeat logic condensed from:
repeat with x from 1 to
repeat with y from 1 to x
set xy to x * y
if (xy >
repeat with z from 1 to y
set halfArea to xy + (x + y) * z
|