Given a number N, you are asked tocountthenumberof integers between A and B
inclusive which are relatively prime to N.
Two integers are said to be co-prime or relatively prime if they have no common
positive divisors other than 1or, equivalently, if their greatest common divisor
is1. The number1is relatively prime toeveryinteger.
【Input】
The first line on input contains T (0 < T <= 100) thenumberof test cases, each ofthe next T lines contains three integers A, B, N where (1 <= A <= B <= 1015) and
(1 <=N <= 109).
【Output】
For each test case, print thenumberof integers between A and B inclusive which
are relatively prime to N. Follow the output format below.
HDU-4135-Co-prime-数论+容斥-[a,b]内与n互素的数的个数【Description】 Given a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime to N.Two integers ar...