Submeter | Todas submissőes | Melhores | Voltar |
Problem hidden
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
Adicionado por: | Ruhan Habib |
Data: | 2015-11-05 |
Tempo limite: | 0.5s-1s |
Tamanho do fonte: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Linguagem permitida: | Todas exceto: ASM64 CLOJURE ERL FSHARP GOSU JS-MONKEY PERL6 PY_NBC SCALA TCL |
Origem: | Me? |