mbrc's blog

By mbrc, 12 years ago, In English

I am a beginner in algorithms and coding contests. Can anyone tell me how to solve 259E - Little Elephant and LCM. I am completely ignorant of a suitable solution. Please help me by telling me the details. Thanks in advance!

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

| Write comment?
»
12 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Suppose t is the max value of sequence b. Then we know that all the elements in b are t's factors, and at least one element's value is t.

Now, think about it :)