Skip to content

Instantly share code, notes, and snippets.

@LaffinToo
Created September 28, 2021 03:29
Show Gist options
  • Save LaffinToo/bf19671b6982dac82c5b61b77c546904 to your computer and use it in GitHub Desktop.
Save LaffinToo/bf19671b6982dac82c5b61b77c546904 to your computer and use it in GitHub Desktop.
#include <stdio.h>
void main(int argc,char **argv)
{
int s=186986851,t,p,i,j,k;
char *fb="FizzBuzz",*fo,*fl,c;
for(i=k=0,t=s>>2,p=s&3;i<100;) {
if(i==p) {
fo=fb+((t&1)<<2);
fl=fo+(((t&2)|(!(t&2)))<<2);
c=*fl;
*fl=0;
t>>=2;
t=!t?s:t;
}
printf(((i!=p)<<2)+"%s \0%d ",i==p?fo:i);
if(i==p) {
*fl=c;
p+=t&3;
t>>=2;
}
for(j=1;j;j<<=1) { k=(j&i);i^=j;j=k?k:0;}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment