Task

Show the first   30   positive integers which are squares but not cubes of such integers.

Optionally, show also the first   3   positive integers which are both squares and cubes,   and mark them as such.




squares = []
tris = []
both = []
for i in range(1, 100)
    tris.push i*i*i
    if tris.indexOf(i*i) == null then
        squares.push i*i
    else
        both.push i*i
    end if
end for
 
print "Square but not cube:"
print squares[:30]
print "Both square and cube:"
print both[:3]