7 BILLION HUMANS

Level 61: Lazy Pathways

Shortest Program

-- 7 Billion Humans (2144) --
-- Level 61: Lazy Pathways --
-- Shortest Program: 11 Commands --
a:
step nw,w,sw,n,s,ne,se
mem1 = set c
mem2 = foreachdir nw,w,sw,n,s,ne,e,se:
    if mem2 < mem1:
        mem1 = set mem2
    endif
endfor
mem1 = calc mem1 + 1
if mem1 < c:
    pickup c
    write mem1
    drop
endif
jump a

Fastest Program

-- 7 Billion Humans (2144) --
-- Level 61: Lazy Pathways --
-- Fastest Program: 220 Seconds --
-- (Note that completion time is affected
-- by the random numbers in this level.)
a:
step nw,w,sw,e
b:
mem1 = set c
if mem1 > 1:
    mem2 = foreachdir nw,w,sw,n,s,ne,e,se:
        if mem2 < mem1:
            mem1 = set mem2
        endif
    endfor
    mem1 = calc mem1 + 1
    if mem1 < c:
        pickup c
        write mem1
        drop
    else:
        mem1 = calc mem1 + 1
        mem2 = foreachdir nw,w,sw,n,s,ne,e,se:
            if mem2 > mem1:
                step mem2
                jump b
            endif
        endfor
    endif
endif
jump a
Back