P22289 [CodeChef] CALCULUS
提高-
题目描述

Read problem statements in [Hindi], [Bengali], [Mandarin Chinese], [Russian], and [Vietnamese] as well.

You are given one positive integer $N$. Calculate
$$\int_{0}^{\infty} \frac{e^{2 \pi x} - 1}{e^{2 \pi x} + 1} (\frac{1}{x} - \frac{x}{N^{2} + x^{2}}) \,\mathrm{d}x \,.$$

It is possible to prove that its value can be written as a fraction $\frac{a}{b}$, where $a$ and $b$ are positive integers and $b$ is coprime with $998,244,353$. You need to find $a \cdot b^{-1}$ modulo $998,244,353$, where $b^{-1}$ denotes the multiplicative inverse of $b$ modulo $998,244,353$.

------ Input ------
The first and only line of the input contains a single integer $N$.

------ Output ------
Print a single line containing one integer $a \cdot b^{-1}$ modulo $998,244,353$.

------ Constraints ------
$1 ≤ N ≤ 10^{6}$

------ Subtasks ------
Subtask #1 (1 point): $N = 2$

Subtask #2 (1 point): $N = 3$

Subtask #3 (98 points): original constraints

----- Sample Input 1 ------
1
----- Sample Output 1 ------
2

输入格式

见题面

输出格式

见题面

样例输入
1
样例输出
2