# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

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 ≤ 10^{9} ).

The output contains one integer on a line by itself. The integer is the count of odd numbers from A to B inclusive.

Input | Output |
---|---|

1 1 | 1 |

Input | Output |
---|---|

1 3 | 2 |

Input | Output |
---|---|

2 3 | 1 |

Input | Output |
---|---|

2 4 | 1 |

Input | Output |
---|---|

3 4 | 1 |

72% Solution Ratio

Ashik1233Earliest,

Ashik1233Fastest, 0.0s

KhanMahediLightest, 0 B

touhidurShortest, 49B

Login to submit