#P1625. 求和
求和
Description
When Gauss was still a kid, he found that
When LT was still a kid, he found that
$$\sum_{i=1}^{n-1} \frac{1}{i\times (i+1)}=1-\frac{1}{n}.$$Now, while you are still a kid, you need to compute:
Input Format
Input two integers .
Output Format
Output two lines. The first line contains an integer , and the second line contains an integer , indicating that , and and are coprime.
1 2
1
2
Hint
, .
of the testdata satisfy .
of the testdata satisfy .
Translated by ChatGPT 5
京公网安备 11011102002149号