27. less than or equal to n 的数的sum=n(n+1)/2,T为multiple 5 and less than or equal to 50的数的sum, S为multiple 6 and less than or equal to 60的数的sum,问T-S?
我选60,我没用上题目给的公式,是把数字一个个列出来算的,幸好不多,但不知有没理解错
Key:-55
如果T是 less than or equal to 50的书的SUM的话,那么T的值是确定的吧?50(50+1)/2=1275。S=60(61)/2=1830
T-S=555?
5到50是46个数字,所以和是 (5+50)*46/2=1265
6到60是55个数字,所以和是 (6+60)*55/2=1815
所以T-S=550。
T为multiple 5
意思是:T是5的倍数吧?不是从5开始吧?
汗,问到答案了,自己答,收尾。
T为multiple 5 and less than or equal to 50的数的sum
5+10+15+。。。+50
6+12+18+。。。+60
T-S=-(1+2+3+。。。+10)=-10×11/2=-55
那这个条件less than or equal to n 的数的sum=n(n+1)/2有什么用呢??题目表达的意思没有看明白哦。。。
欢迎光临 ChaseDream (https://forum.chasedream.com/) | Powered by Discuz! X3.3 |