No.1180 Infinite Sum
Problem Statement
You are given a positive integer $n$.
Find $\displaystyle \sum_{a_1=1}^\infty \sum_{a_2=1}^\infty ..... \sum_{a_n=1}^\infty \frac{1}{{a_1}^2 B}$.
Here,
$A$=$\displaystyle \prod_{k=1}^n {a_k}^2 $
$B$=$\displaystyle \sum_{k=1}^n \frac{A}{{a_k}^2}$
are defined as above.
Also, truncate the fractional part of the answer when printing it.
Input
$n$
$1 \le n \le 50$
At $23:07$, a rejudge was performed because the test cases contained a case outside the above constraints.
Output
Print a newline at the end.
Sample
Sample 1
Input
1
Output
1
This is $\displaystyle \sum_{a_1=1}^\infty \frac{1}{{a_1}^2}$, so it is the famous Basel problem.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
kozy