The sum of the first k positive integers is equal to, k(k+1)/2, What is the sum of the integers from n to m, inclusive, where 0<n<m?
gwd 答案为 C m(m+1)/2 -(n-1)n/2
请求思路!
举报
m(m+1)/2-n(n+1)/2+n=m(m+1)/2-n(n-1)/2
因为n和m是inclusive的,而直接减的话会把n减掉,所以要重新加回来
Thanks a lot!got that!
I feel i am a fool.....
发表回复
手机版|ChaseDream|GMT+8, 2025-11-6 08:45 京公网安备11010202008513号 京ICP证101109号 京ICP备12012021号
ChaseDream 论坛
© 2003-2025 ChaseDream.com. All Rights Reserved.