ss: randomize n and k, and return 1 on error