Ndb

发布时间: 2017年12月10日 22:14   最后更新: 2017年12月10日 22:18   时间限制: 1000ms   内存限制: 512M

There are n members in the Ndb(N*d*** beach) organization, each of whom has its own DTR(DOUTONBORI ROBO). In order to distinguish their DTRs, they decided to mark different numbers on these n DTRs. Ndb founder, little G, believes that only when these n numbers form a geometric sequence, can fully show the charm of Ndb. Due to some technical reasons, the number marked on the DTR can only be an integer in interval [L,R]. Now little G wants to know how many different available manners to choose numbers. There are T test cases.

In the first line there is an integer T (T<=10000), which indicates the number of test cases.
In the next T lines there are three integers n, L and R (1<=n<=10^7, 1<=L<=R<=10^7).
There are only 10 test cases that n, L, R > 1000.

For each test case, print the answer in a line.

复制
2
3 1 10
1 1 10000000
4
10000000

The first test case: the answer is 4 : {1, 2, 4},{1, 3, 9},{2, 4, 8},{4, 6, 9}.

The second test case: the answer 10000000: {1}, {2}, {3}, ……

2017 fdu-icpc

2017 Fudan ACM-ICPC 程序设计校赛现场赛