Mario's blog

By Mario, 4 years ago, In English

 https://www.spoj.com/problems/EASYMATH/ My Solution !! Getting Wrong Answer !!

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I think you should first take a review before posting blogs on Codeforces.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

The idea is correct but here It is not necessary that all the five numbers are relatively coprime.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Means this method is only use when all number are relatively coprime

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Instead, directly multiply all the numbers in denominator part take LCM of all those.