An interesting programming challenge
Colin Holgate
colinholgate at gmail.com
Thu Apr 9 20:42:29 EDT 2015
I got a “nice try” because I mistyped the answer I (I typed 71393 instead of 71939). Here was my script (after many returns):
on mouseUp
put 0 into howmany
put “the numbers they provided inside quotes" into numbers
repeat with a = 1 to the number of items in numbers
repeat with b = a to the number of items in numbers
put item a to b of numbers into somenumbers
if sum(somenumbers) > 31 then add 1 to howmany
end repeat
put the number of items in numbers && a
end repeat
answer howmany
end mouseUp
More information about the use-livecode
mailing list