(프로그래머스) 두 정수 사이의 합

유지원·2022년 4월 18일
0

프로그래머스

목록 보기
29/66
post-thumbnail

문제 링크

https://programmers.co.kr/learn/courses/30/lessons/12912?language=javascript


Javascript

function solution(a, b) {
  return (a+b) * (Math.abs(b-a)+1)/2
}
profile
👋 https://github.com/ujw0712

0개의 댓글