Public submissions
Source code of every submission to this problem in this contest
will be visible for everyone since 20130826 12:38:07.
Submit  All submissions  Best solutions  Back to list 
SMPSUM  Iterated sums 
Please compute the sum of squares for the given numbers: a, a+1, ..., b1, b.
Input
Two numbers: a and b separated by space, where 1 <= a <= b <=100.
Output
Computed sum: a*a + (a+1)*(a+1) + ... + (b1)*(b1) + b*b
Example
Input: 1 4 Output: 30
Example 2
Input: 5 6 Output: 61
Added by:  kuszi 
Date:  20130826 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Public source code since:  20130826 12:38:07 
hide comments


20131227 00:02:48 kuszi
@Tarun yes, the appropriate statement has been added to the problem description. Thank you for the comment. 

20131226 12:50:00 Tarun
in the input are the two values seperated by a space? 

20131216 14:17:57 Samil Vargas
i hope do it with gauus sum. 

20130826 10:52:04 kuszi
Are you able to compute the sum without iterations? 