본문 바로가기
python-algorithm

[백준] 2355

by 무적김두칠 2020. 12. 18.

1
2
3
import sys
a,b=map(int, input().split())
print(int ((a+b)*(abs(a-b)+1)/2))
cs
반응형

'python-algorithm' 카테고리의 다른 글

[백준] 2443  (0) 2020.12.18
[백준] 2442  (0) 2020.12.18
[백준] 2061  (0) 2020.12.18
[백준] 2010  (0) 2020.12.18
[백준] 1975  (0) 2020.12.17

댓글