#F. 特别难的概率问题

    Type: Default 1000ms 256MiB

特别难的概率问题

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

对某一区间[l,r],随机取一个数是素数的概率。

会有多次询问。

Format

Input

第一行输入一个数t,代表要询问的次数。

第二行输入两个数l和r,代表区间[l,r]。

以上数据范围 1<=t,l,r<=1e6

Output

对每次询问输出一个数代表如题目描述的概率,保留三位小数。

Samples

1
1 10
0.400

Limitation

1s, 1024KiB for each test case.

蓝桥杯训练一暨22级新生周赛第八场

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
10
Start at
2023-1-17 13:00
End at
2023-1-17 18:00
Duration
5 hour(s)
Host
Partic.
36