HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Repetition (Loops) > problem:


006. 50293 - Sum of odd numbers from a to b

Guest
• Review clarifications (2)

Volume problems

• 002. 50365 - Sum of the numbers f...
• 002. 50452 - Multiplication Table
• 002. 50554 - nth power of m
• 003. 50387 - Passengers in the Train
• 003. 50358 - Series of Odd Numbers
• 004. 50424 - Area
• 004. 50522 - Multiplication Table - 2
• 005. 50297 - Divisible By Five
• 006. 50293 - Sum of odd numb...
• 007. 50401 - Sum of Odd Numbers
• 009. 50783 - The smallest number
• 010. 50782 - Max of N integers
• 012. 50352 - Selling Cows
• 012. 50589 - The Number of Eggs Sold
• 015. 50466 - Drawing Square From...
• 016. 50463 - Drawing a Triangle
• 017. 50423 - Numbers square

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Ibrahim Mesecan.

Sum of odd numbers from a to b

You will be given two numbers a and b. Calculate and show the sum of odd numbers from a until b.

Input specification
You will be given the two integers a and b where 1 ≤ a < b ≤ 5000

Output specification
Show the sum of odd numbers from a until b.

Sample Input I
  4 10
Sample Input II
  2 28
Sample Output I
  21
Sample Output II
  195


Для отправки решений необходимо выполнить вход.

www.contester.ru