Sum of squares and cubic and
Time limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)
Total submission (s): 109261 Accepted Submission (s): 35235
Problem Description
Given a continuous number of integers, the sum of squares of all even numbers is calculated and all the odd cubic and.
Input
The input data contains multiple sets of test instances, each containing a row consisting of two integers m and N.
Output
For each set of input data, the output line should consist of two integers x and y, representing the sum of all the even squares of the consecutive integers in that segment and all the odd cubic and.
You can assume that a 32-bit integer is sufficient to save the result.
Sample Input
1 3
2 5
Sample Output
4 28
20 152
Author
Lcy
Source
C Language Programming exercises (i)
Square and Cubic and AC Hangzhou Electric