A Loop Problem

View as PDF

Submit solution

Points: 3
Time limit: 0.2s
Memory limit: 64M

Author:
Problem type

Dereck is learning for loops but doesn't know what a keyboard is. Can you help him?

Given L and R, output the sum of all integer numbers between L and R (inclusive).

Input Specification

The first line will contain the integers L and R (0\ <\ L\ \le\ R\ \le\ 2^{31}-1).

Output Specification

Output the sum of all integer numbers between L and R (inclusive).

Sample Input

1 10

Sample Output

55

Comments


  • -1
    xToppz  commented on Oct. 31, 2022, 1:21 p.m.

    mogus


  • -1
    estanzoo  commented on March 11, 2022, 5:15 p.m.

    jebaited