ModInts example: use invmod instead of gcdx

Ref: 331eb3f