论文部分内容阅读
大家或许听说过德国大数学家高斯小时候的那个有名的故事:因为班上的同学调皮,老师给所有同学布置了一个任务:计算从1一直到100的所有整数的总和.结果,小高斯在数秒钟之内就算出了答案,让老师目瞪口呆.现在,我们已经无法考证当时小高斯的思路是什么了(我们甚至也无法判断这段故事的真实性),但我们至少可以进行一些猜测.其中一种可能的思路就是,先把100以内的正整数从小到大写成一行,再把这些正整数从大到小写成一行,然后会发现,每两个对应的数加起来都是101:
Everyone may have heard of the famous story of the German great mathematician Gauss when he was a child: Because classmates naughty, the teacher arranged for all their classmates a task: to calculate the sum of all integers from 1 up to 100. As a result, Now that we can no longer figure out what the thinking of the small Gaussian was at the moment (we can not even judge the truth of the story), we can at least make some guesses. One possible way of thinking is to first line up the positive integers within 100 from small to large and then put the positive integers in descending order. You will then find that the sum of each two is 101: