你听说过 oo + oo = oo 吗?(请把oo当作无穷符号,^_^)
假设有一个无穷个房间的旅馆,来了一辆装着无穷多人的客车,问旅馆能否住的下新来的旅客?
做法很简单,只要已经住下的第 i 个房间的客人搬到第 2i 个房间,那么 i 号房间就能空出来,给新来的旅客住.
所以 无穷 + 无穷 = 无穷, 即 oo + oo = oo
=========================冷酷的中英文分割线=========================
There are cells in a line, every cell have some stars, the ith position contains a[i] stars.
A rabbit in position can jump from x to 2*x , and he will collect the stars he has travelled
The number of cells is 2*n, you are asked to calculate how many star will a rabbit collects jump from 1, 2, 3... n
A rabbit only jump once2 3 1 2 3 4 5 6 2 2 2 3 3
3 9 18 4 8
the first case: jump from 1 -> 2: 1 + 2 = 3 jump from 2 -> 4: 2 + 3 + 4 = 9 jump from 3 -> 6: 3 + 4 + 5 + 6 = 18
by k_arthur4