Something went wrong. Try again.
Hello.
Something went wrong. Try again.
12345678910111213141516#include "fate.h"
static uint64_t mix(uint64_t x){ x += 0x9e3779b97f4a7c15u; x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9u; x = (x ^ (x >> 27)) * 0x94d049bb133111ebu; return x ^ (x >> 31);}
unsigned fate(uint64_t seed, long when, int question, unsigned sides){ uint64_t asked = mix((uint64_t)when * 1000003u + (uint64_t)question); return (unsigned)(mix(seed ^ asked) % sides);}