Submit | All submissions | Best solutions | Back to list |
MADODDSUM - Easy Odd Sum |
Hablu likes odd numbers a lot. So he wants the sum of all odd numbers in range [a, b]. That is, find the sum of all odd numbers i such that (a ≤ i ≤ b). Seems easy right? Because it is.
Input
The first and only line will contain 2 integers a, b where (0 ≤ a ≤ 108) and (0 ≤ b ≤ 108).
Output
In one line, output the value of the sum
Example
Input: 0 9 Output: 25
Added by: | Ruhan Habib |
Date: | 2015-11-05 |
Time limit: | 0.5s-1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 GOSU JS-MONKEY |
Resource: | Me? |
hide comments
|
|||||||
2015-11-09 14:49:00 Prakhar Dev Gupta
Your given constraints and example do not match!!! |
|||||||
2015-11-07 06:32:10 Ruhan Habib
@gullu_mishra why? |
|||||||
2015-11-06 18:21:08
speechless :D |