3 ms·
If this is the kind of thing you're into, check out the The International Obfuscated C Code Contest at http://www.ioccc.org http://www.ioccc.org Some of the su
by JonnieCache 15y ago
If this is the kind of thing you're into, check out the The International Obfuscated C Code Contest at http://www.ioccc.org http://www.ioccc.org
Some of the submissions are absolutely fiendish. Fabrice Bellard's are particularly interesting, just like all his other work.
See if you can work out what westley.c from 1988 does:
#define _ -F<00||--F-OO--;
int F=00,OO=00;main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO()
{
_-_-_-_
_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_
_-_-_-_
}
- __rkaup__ 15y agoOn my machine, this comes up with 2.50.
- jessedhillon 15y agoOn mine it's 0.250
- __rkaup__ 15y agoYou need to change the #define to #define _ F-->00||F-OO--; See http://ioccc.org/1988/westley.hint http://ioccc.org/1988/westley.hint