diff --git a/2000/natori/README.md b/2000/natori/README.md index eee43204e..9310e957b 100644 --- a/2000/natori/README.md +++ b/2000/natori/README.md @@ -12,6 +12,12 @@ Japan make ``` +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this so that it +works with modern compilers. Depending on the compiler it would either segfault +when run or not compile at all (gcc and clang respectively). Thank you Cody for +your assistance! + + ### To run: ```sh diff --git a/2000/natori/natori.c b/2000/natori/natori.c index bf22285d2..8f0c7ac16 100644 --- a/2000/natori/natori.c +++ b/2000/natori/natori.c @@ -1 +1,4 @@ -double l;main(int _,char**o,char**O){return putchar((_--+22&&_+44&&main(_,-43,_),_&&(int)o)?(main(-43,++(int)o,(int)O),((l=((int)o+21)/sqrt(3-(int)O*22-(int)O*(int)O),l*l<4&&(fabs(((time(0)-607728)%2551443)/405859.-4.7+acos(l/2))<1.57))[" #"])):10);} +double l; +int moon(int _, int o, int O){ +return putchar((_--+22&&_+44&&main(_,-43,_),_&&(int)o)?(main(-43,(int)++o,(int)O),((l=((int)o+21)/sqrt(3-(int)O*22-(int)O*(int)O),l*l<4&&(fabs(((time(0)-607728)%2551443)/405859.-4.7+acos(l/2))<1.57))[" #"])):10);} +main(int _,char**o,char**O){return moon(_, (int)o, (int)O); }