Last active
August 4, 2019 09:40
-
-
Save nullableVoidPtr/e6840696c3123ea5c192a1f33d86435e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
unsigned char gcd256(unsigned char a) { | |
for (int i = 0; i < 8; i++) if ((a >> i) & 1) return 1 << i; | |
} | |
int main() { | |
for (int i = 0; i < 256; i++) printf("%d\n", gcd256(i)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment