Skip to content

Instantly share code, notes, and snippets.

@jdonszelmann
Created September 27, 2018 21:16
Show Gist options
  • Save jdonszelmann/99b58b37f90fb69a5e507c3b4debbc0c to your computer and use it in GitHub Desktop.
Save jdonszelmann/99b58b37f90fb69a5e507c3b4debbc0c to your computer and use it in GitHub Desktop.
//compile withgcc -Wno-implicit-int -Wno-implicit-function-declaration -D j=printf -D _=typedef -o out fizzbuzz.c
#include <stdio.h>
_ char r;r a[] = {2,5,6,1,9,4,0,7,3,8,11};
_ int (*l)();_ int q;c(b){for (r i = 0;i[a
]!=11;++i){if(i[a]==b) return i;}};m(a,b,i
){return i*
b-a==c(2)?c
(c(6)):i*b<
a?m(a,b,i+c
(5)):a-b*(i
-c(c(4)));}
x(i){j((r []){0106,0151,0172,0172,c(2)});}
y(i){j((r []){0102,0165,0172,0172,c(c(6))}
);}z(i){x();y();}d(a,b){return c(c(1)+c(4)
)*a+a+b;}w(
i){j((r [])
{045,0151,0
},i);}l f(i
){return !m
(i,d(1,5),1
)?z:!m(i,c(
1),1)?x:!m(
i,c(c(9)),1
)?y:w;}main
(i){f(i)(i)
;j((r[]){10
,c(2),c(c(6
))});return
(i!=d(d(1,0
),0))?main(
i+1):c(2);}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment