the best way to optimize a program for space is to remove all spaces and tabs from the source code also don't use many lines,write everything on one single line