Data Structures and Algorithms

posted by .

Given integers R,M with M≠0, let S(R,M) denote the smallest positive integer x satisfying the congruence
Rx≡1(mod M)
if such an x exists. If such an x does not exist, put S(R,M)=0.

Each line of this text file contains a pair of space separated integers representing R and M, respectively.

Let L be the list of integers whose k-th element is the value of S(R,M), where R and M are taken from the k-th line of the text file.

Let T be the sum of all elements of L. What are the last three digits of T?

  • Data Structures and Algorithms -

    how can i give the link ??

  • Data Structures and Algorithms -

    545

  • Data Structures and Algorithms -

    Only a few of us are permitted to post links here.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Math

    Let a be an integer, then there are integers X, Y such that aX+(a+1)Y=1. Find the smallest positive value of Y.
  2. math

    there are three consecutive positive integers such that the sum of the squares of the smallest two is 221. write and equation to find the three consecutive positive integers let x= the smallest integer
  3. Math

    N is an integer such that N≡179(mod233) and N≡233(mod179). Determine a three digit positive integer M such that N≡M(mod179×233). Details and assumptions You may use the fact that 179 and 233 are primes.
  4. Math (algebra)

    Suppose a and b are positive integers satisfying 1≤a≤31, 1≤b≤31 such that the polynomial P(x)=x^3−ax^2+a^2b^3x+9a^2b^2 has roots r, s, and t. Given that there exists a positive integer k such that (r+s)(s+t)(r+t)=k^2, …
  5. Maths

    Suppose a and b are positive integers satisfying 1≤a≤31, 1≤b≤31 such that the polynomial P(x)=x3−ax2+a2b3x+9a2b2 has roots r, s, and t. Given that there exists a positive integer k such that (r+s)(s+t)(r+t)=k2, …
  6. Math algebra

    Let N be the sum of all positive integers q of the form q=p^k with prime p, such that for at least four different integer values of x from 1 to q, x^3−3x≡123(modq). What are the last 3 digits of N?
  7. algebra

    Find the largest possible integer n such that there exists a non-constant quadratic polynomial f(x) with integer coefficients satisfying f(1)∣f(2),f(2)∣f(3),…f(n−1)∣f(n). Details and assumptions: ~For (possibly …
  8. MATHS

    Find the largest possible integer n such that there exists a non-constant quadratic polynomial f(x) with integer coefficients satisfying f(1)∣f(2),f(2)∣f(3),…f(n−1)∣f(n). Details and assumptions For (possibly …
  9. maths

    Find the smallest n such that for any prime p, at least 20 numbers 1,2, ..., n are quadratic residues not modulo p. k is quadratic residue modulo p if there exists an integer j such that j^2 ≡ k (mod p).
  10. maths

    (x+y)(x+z)(y+z)=2017^n What is the minimum value n of such that there exist positive integers x,y and z satisfying the equation above?

More Similar Questions