시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
5 초 | 256 MB | 45 | 39 | 35 | 89.744% |
Mr. A invites you to solve the following problem:
“Let be \(m\) and \(n\) two positive integers, \(5 \le m \le 100\), \(2 \le n \le 100\). Consider the following sets of triples:
\[T_{m,j} = \left\{ { (x,y,z) \in \mathbb{N}^{3} }|{ x \le y \le z \le m ~ and ~ x^j + y^j = z^j } \right\} , j = 2 .. n\]
where \(\mathbb{N}\) is the set of nonnegative integers (\(\mathbb{N}\) = {0, 1, 2, ...}).
The problem asks you to compute the sum \(S_{m,n}\):
\[S_{m,n} = \sum_{j=2}^{n}{card(T_{m,j})}\]
where \(card(T_{m,j})\) is the number of elements of the set \(T_{m,j}\)."
The input file contains a single test. The first line of the input file contains the value of \(m\)and the second line contains the value of \(n\).
The result will be written to standard output.
85 95
8128
ICPC > Regionals > Europe > Southeastern European Regional Contest > SEERC 2014 H번