Count the Odds
Sometimes, contestants tend to look for patterns in problem descriptions. They try to figure out the setter for a problem from the writing style of a description. Some setters try to write bigger stories, others may write a 2-liner. Let’s have a short description today!
You will be given two integers A and B, you’ll have to tell how many odd numbers are there within the range from A to B inclusive. An odd number is an integer that has reminder 1, if it is divided with 2.
The input contains one line with two integers A and B ( 1 ≤ A ≤ B ≤ 109 ).
The output contains one integer on a line by itself. The integer is the count of odd numbers from A to B inclusive.
TarifEzazTarif loves sport programming contests. When he is not solving problems himself, he is training others to do it. →