Problem Statement | |||||||||||||
Using mathematical induction it is possible to prove the following inequality when n>1:s = 13 + 23 + ... + (n-1)3 < n4/4 < 13 + 23 + ... + n3 = SGiven n return (S+s)/2 - n4/4 as a int[] with 2 elements. Elements 0 and 1 denote the numerator and denominator of the return value, respectively, when written in least terms (reduced). | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | n will be between 2 and 100 inclusive. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
|