Блог пользователя HaabyHings

Автор HaabyHings, история, 7 лет назад, По-английски

let there be 3 integers x, y, z
their multiplication (x * y * z) is can be calculated either as (x * y) * z or x * (y * z) // associativity holds
now assume x / (y * z) = x * (1 / y) * (1 / z)
let Y and Z be the multiplicative modular inverse of (1 / y) and (1 / z) respectively
then result can be written as x * Y * Z
here (x * Y) * Z != x * (Y * Z) { WHY ? } // associativity does not holds

Полный текст и комментарии »

  • Проголосовать: нравится
  • -1
  • Проголосовать: не нравится

Автор HaabyHings, история, 7 лет назад, По-английски

Link to the yesterday's codechef contest.
Unable to solve it.
Any hint or approach would be Appreciated.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится