Sum of integers on the interval#2860

Sum of integers on the interval (Discussion)

  1. Sep 26, 2026, 8:53 AM

    a, b = map(int, input().split())

    if a > b:

    a, b = b, a

    say = b - a + 1

    print((a + b) * say // 2)

  2. RofaMuslumOct 5, 2024, 11:35 AM

    This code desciption is wrong!!

    1. skolodyazhnyyOct 5, 2024, 7:31 PM

      RofaMuslum the problem and editorial are correct, please be more specific