# Goal = 168 bytes $w = $ARGV[0]; $h = $ARGV[1]; if( !($w && $h && $w =~ /^(\d+)$/ && $h =~ /^(\d+)$/ && $w > 2 && $h > 2) ) { $w = $h = 64; } print "P1\n$w $h\n", "0\n" x $w; for($y = 1; $y < $h - 1; $y++) { print "0\n"; for($x = 1; $x < $w - 1; $x++) { print (rand() > $y / $h ? "0\n" : "1\n"); } print "0\n"; } print "0\n" x $w;