QOJ.ac

QOJ

Límite de tiempo: 1.0 s Límite de memoria: 2048 MB Puntuación total: 100

#15934. 心率

Estadísticas

测量心率的一种常用方法是将食指和中指放在气管旁的脖子上。然后,你计算在 15 秒内感受到的心跳次数,并将该数字乘以 4,从而得到以每分钟心跳次数(BPM)为单位的心率估值。这种方法可以提供一个很好的估计,但并不完全准确。一般来说,如果你在 $p$ 秒内测得 $b$ 次心跳,则 BPM 计算为 $\frac{60b}{p}$。

对于本题,我们假设所有的心率都是恒定不变的。如果 $t$ 是每次心跳之间的时间(以秒为单位),我们将你的实际每分钟心跳次数(ABPM)定义为 $\frac{60}{t}$。

输入格式

输入以一个整数 $N$ ($1 \le N \le 1000$) 开始,表示接下来的测试用例数量。

接下来的 $N$ 行中,每行指定一个测试用例,包含如上所述的整数 $b$ ($2 \le b \le 1000$) 以及 $p$ ($0 < p < 1000$)。$p$ 的值是一个精确到小数点后 4 位的实数。

输出格式

对于每个测试用例,在单行中输出最小可能的 ABPM、计算出的 BPM 以及最大可能的 ABPM,中间用空格分隔。如果你的答案的绝对误差或相对误差不超过 $10^{-4}$,则将被视为正确。

样例

输入样例 1

2
6 5.0000
2 3.1222

输出样例 1

60.0000 72.0000 84.0000
19.2172 38.4344 57.6517

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.