Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

HaabyHings's blog

By HaabyHings, history, 10 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • -1
  • Vote: I do not like it

By HaabyHings, history, 10 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it