当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6758:Integral Calculus

题目描述
Ely has just faced a complicated math problem. So she now needs assistance of you – a talented programmer. The problem is as below.

Given a positive integer N, calculate the following value:

We can prove that it is a rational number. Let’s denote it by $Q/P$, where gcd(P,Q)=1 and P,Q>0. Since these numbers can be very huge for large N, you are only to print the value $Q \cdot P^{-1}$ mod ($10^9$+9). Here $P^{-1}$ is multiplicative inverse of P modulo $10^9$+9.
输入解释
The first line of the input contains a single integer T(1≤T≤$10^5$), the number of test cases.

Each of the next T lines contains an integer N(1≤N≤$10^5$ ), which is described above.
输出解释
For each test case, you should print the answer in a single line.
输入样例
1
1
输出样例
400000006
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6758

最后修改于 2020-10-25T23:34:07+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
7000/3500MS(Java/Others) 532768/532768K(Java/Others)