Agorithm/백준 알고리즘
백준 알고리즘 7523번 Gauß(python)
kimjinho1
2021. 2. 18. 02:14
728x90
반응형
단순 수학 문제이다.
for i in range(int(input())):
a, b = map(int, input().split())
res = (b-a+1) * (a+b)//2
print(f"Scenario #{i+1}:")
print(f"{res}\n")
728x90
반응형