From [http://en.wikipedia.org/wiki/Modular_multiplicative_inverse Wikipedia]: In [[wp:modular arithmetic|modular arithmetic]],   the '''modular multiplicative inverse''' of an [[integer]]   ''a''   [[wp:modular arithmetic|modulo]]   ''m''   is an integer   ''x''   such that ::a\,x \equiv 1 \pmod{m}. Or in other words, such that: ::\exists k \in\Z,\qquad a\, x = 1 + k\,m It can be shown that such an inverse exists   if and only if   ''a''   and   ''m''   are [[wp:coprime|coprime]],   but we will ignore this for this task. ;Task: Either by implementing the algorithm, by using a dedicated library or by using a built-in function in your language,   compute the modular inverse of   42 modulo 2017.