3 ms·
Re-formatted for reading, #include <math.h> int main() { int v, i, z, n, u, t; for (v = -1;;) { for (n = pow(1.05946309,
by ralph 14y ago
Re-formatted for reading,
#include <math.h>
int main()
{
int v, i, z, n, u, t;
for (v = -1;;) {
for (n = pow(1.05946309, "CWG[Cgcg[eYcb^bV^eW^be^bVecb^"[++v & 31] + (v & 64) / 21), i = 999;
i;
putchar(128 + ((8191 & u) > i ? 0 : i / 8) - ((8191 & (z += n)) * i-- >> 16))) {
u += v & 1 ? t / 2 : (t = v & 6 ? t : n / 4);
}
}
return 0;
}
Can this be simplified to just use an incrementing t? Otherwise I'm not sure it's in keeping with the spirit of the original. :-)
BTW, the increment and use of v without a sequence point in between may bite.
- ralph 14y agoWell, I suppose given it will cycle it can be simplified to an array indexed based on t; still don't think that's playing the game though.