Ответ: python
a, b = map(int, input().split())
c, d = map(int, input().split())
sab = 0
scd = 0
for i in range(min(a, b), max(a, b) + 1):
sab += i
for i in range(min(c, d), max(c, d) + 1):
scd += i
print(sab)
print(scd)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ: python
a, b = map(int, input().split())
c, d = map(int, input().split())
sab = 0
scd = 0
for i in range(min(a, b), max(a, b) + 1):
sab += i
for i in range(min(c, d), max(c, d) + 1):
scd += i
print(sab)
print(scd)