Pascal's triangle/Puzzle: Difference between revisions

no edit summary
No edit summary
Line 731:
{Application.exit 0}
end</lang>
=={{header|PARI/GP}}==
first piece I can gather is x+y+22 = 40;so x+y=18 this is a fact to check for; also once a pair of x and y =18; also x+2y+z+30 = 151; so x+2y+z = 121; another fact to check for when going through z values. As 121-18(the least x+2*y can equal) = 103 it becomes our limit for z.
<lang PARI/GP>
for(x=0,18,for(y=0,18,if(x+y=18,for(z=1,103,if((x+2*y+z)==121,print(x","y","z);break(3))))))
</lang>
 
Please Note this is a assuming there's a positive solution (I did find 0,18,85), so our minimums are all 0. Also please Note I gathered information first so i didn't do :
 
<lang PARI/GP>
for(x=0,151,for(y=0,151,for(z=1,151,if((x+2*y+z+11+11+4+4)==151,print(x","y","z);break(3)))))
</lang>
 
=={{header|PicoLisp}}==
Anonymous user