计算1/5+1/10+1/20+1/40+…+1/2560
问题描述:
计算1/5+1/10+1/20+1/40+…+1/2560
答
1/5+1/10+1/20+1/40+…+1/2560= 1/2560 * (512 + 256 + 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1)= 1/2560 * (2^9 + 2^8 + ... + 2^0)= 1/2560 * (2^10 - 1)= 1/2560 * (1024 - 1)= 1023/2560