Skip to content
Embercode
✕
Number theoryQuick quiz

Modular toolkit

7 questions. Covers Modular inverse and division.

Questions 1 to 5 of 7

  1. 1. An AI tool wrote this line for a modular product. The variables are long long. ``cpp long long r = a * b % 1000000007LL; // a and b are near 1e18 `` A reviewer says it is wrong. What is the reason?
  2. 2. What is 6 / 7 modulo 1000000007, as a number from 0 to 1000000006?

    Type a number.

  3. 3. Which statements about the inverse of a modulo m are true?

    Pick every answer that is true.

  4. 4. About how many squarings does binary exponentiation do when the exponent is 10^18?
  5. 5. Name the prime modulus used in the lesson's worked examples, as a plain integer.

    Type your answer.

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.