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
hide comments
kartik_927:
20200504 12:10:34
use formulae, use your mind not always the syntax 

rohan811:
20190720 08:37:30
accepted in one go 

coderboy_:
20190425 21:11:51
Just find the sum of the square of the greater number and then subtract that from the square of smaller number  1 Last edit: 20190425 21:15:59 

adixozord:
20190227 15:16:16
test cases may misguide you, correct output for :


krish_47:
20181118 07:25:47
This problem can be solved in O(1) time . 

mohameda7maa:
20181004 08:33:49
a, b as input


nadstratosfer:
20180520 04:43:52
pintman: Not true, all input files contain exactly 2 spaceseparated numbers in a line. Got AC with a solution designed to crash if it was otherwise. Last edit: 20180520 04:44:43 

pintman:
20180519 08:49:30
It seems that input().split() (in python) results in three values for the first input but into two values for all others. Your input data may be not consistent. :( 

freborn:
20180323 16:56:13
AC in one go ! easy for a biginner :: 

lohithsai:
20171227 13:22:02
guys here it is very simple that given question is iterated sum just apply logic:

Added by:  kuszi 
Date:  20130826 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 