#!/usr/bin/perl -w $text = (' ' x (79 - length('#include'))) . '#include' . 'typedef int O;' . 'void o(O _){putchar(_);}' . 'O main()' . '{' . 'O*_[512],**p=_,**d,b,q;' . 'for(b=0;b++<512;p=_+q)' . '_[q=(p-_+1)*9%512]=(O*)p;'; $p = 0; $parity = 0; @c = ('p', 'd'); foreach (unpack 'C*', join '', <>) { $q = $p; for($steps = 512; abs($p - $q) - $_; $steps--) { $q = ($q + 1) * 9 % 512; } $text .= "o(" . ($p > $q ? "$c[$parity]-" : "") . "(" . $c[$parity ^ 1] . "=" . ('*' x $steps) . '(O**' . ('*' x $steps) . ")$c[$parity])" . ($p > $q ? "" : "-$c[$parity]") . ");"; $parity ^= 1; $p = $q; } for(; length($text) % 79 > 79 - length("return"); $text .= "{;}") { } for($text .= "return+0;}"; length($text) > 79; $text = substr($text, 79)) { print substr($text, 0, 79), "\n"; } print "$text\n";