16 lines
283 B
Text
16 lines
283 B
Text
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]
|