ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Арифметика > задача:


50047 - Sum of the numbers from a to b

Задачи раздела

• 50274 - Sum of the series
• 50005 - Power of two
• 50007 - Even numbers in even posit...
• 50008 - Sum of odd numbers from ...
• 50012 - Number Pattern
• 50013 - John's Tasks
• 50023 - Missing Number
• 50031 - Separate Into Digits
• 50047 - Sum of the numbers fr...
• 50060 - Total Salary Paid
• 50069 - Sum of Odd Numbers
• 50074 - Molecules
• 50091 - Pocket Money
• 50109 - Class Average (3 Grades)
• 50156 - Armstrong Numbers - 2
• 50157 - Palindromic Numbers
• 50166 - Max of 3 numbers

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Prepared by Ibrahim Mesecan. Сложность Альфа

Sum of the numbers from a to b

Question:
Write a program that calculates sum of the numbers from a to b with the steps of k.

Input specification
You will be given three integer numbers (a, b, k) where 0 ≤ a < b ≤ 30000 and 0 < k ≤ 100.

Output specification
Show one integer (sum of the numbers from a to b with the steps k).

Sample Input I   
  21 24 1
Sample Input II   
  237 1786 50
Sample Output I   
  90
Sample Output II  
  30597


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

www.contester.ru