In response to this challenge McNugget numbers  I wrote C code based on a different approach than exhibited in the LISP solution and obviously the Haskell solution. I tried to make it shorter, but instead only succeeded to obfuscate the code – normally my source files are much more readable.

Please leave a comment if you need my explanation how it works, or a more readable Python equivalent.

#include <stdio.h>
#define M(x) ((x) % 20)
int main()
  char a[20]={1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
  int k=0,c=0;
    int i=M(k);
  return 0;