Number Theory Problem from UVA (UVA 12888 Count LCM)

Revision en2, by Tobby_And_Friends, 2016-11-04 07:55:17

Problem name: Count LCM


Let's say n < m. Then the answer is for each integers i, from 1 to n, how many integers up to m are co-prime with i. I tried solving the problem but it got me a TLE. How do I optimize my solution? Any help is really appreciated.

Solution Link:

Tags number theory


  Rev. Lang. By When Δ Comment
en2 English Tobby_And_Friends 2016-11-04 07:55:17 2 Tiny change: 'ount LCM\nLink: ht' -> 'ount LCM\n\nLink: ht'
en1 English Tobby_And_Friends 2016-11-04 07:54:38 412 Initial revision (published)