#include static int table[256]; int main() { int i, j; unsigned c; for(i = 0; i < 256; i++) { c = i; for(j = 0; j < 8; j++) { if( (c & 1) != 0 ) c = (c >> 1) ^ 0xedb88320; else c >>= 1; } table[i] = c; } c = ~0; while( (i = getchar()) != EOF ) c = (c >> 8) ^ table[(c ^ i) & 0xff]; printf("%08x\n", ~c); return 0; }