DWITE Online Computer Programming Contest
Sum 'Em Up
Given two integers, determine the sum of the integers, between and including these two integers.
For example, given the two integers 6 and 12, the sum of the integers between and including these two integers is: 6+7+8+9+10+11+12=63.
The input will contain five lines of data. Each line will contain two integers m and n, -1000 ≤ m, n ≤ 1000. m ≠ n. The integers will be separated by a space.
The output will contain five lines of data, corresponding to the input. It will list the numbers from lowest to highest, each separated by a plus sign, +, and the equal sign, =, and the sum.
Sample Input (Only three lines given)
2 4 6 12 6 -3
2+3+4=9 6+7+8+9+10+11+12=63 -3+-2+-1+0+1+2+3+4+5+6=15
Point Value: 5
Time Limit: 1.00s
Memory Limit: 32M
Added: Mar 06, 2009
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3