#B2059. Sum of Odd Numbers in Range
Sum of Odd Numbers in Range
Sum of Odd Numbers in Range
Given two non-negative integers \(m\) and \(n\) (with \(m \le n\) and \(n \le 300\)), compute the sum of all odd numbers in the interval \([m, n]\). For example, if \(m = 3\) and \(n = 12\), the sum is \(3 + 5 + 7 + 9 + 11 = 35\).
inputFormat
The input consists of two space-separated non-negative integers \(m\) and \(n\).
outputFormat
Output a single integer which is the sum of all odd numbers between \(m\) and \(n\) (inclusive).
sample
3 12
35