摘要:
http://www.bianchengla.com/course/cpp/practise/problem?id=1269可以计算出投一次可得的分数是1*1/6 + 2 * 1/6 + 3 * 1/6 + 4 * 1/6 + 5 * 1/6 + 6 * 1/6 = 3.5 ;然后n次的期望就是3.5*n;代码:View Code #include <stdio.h>#include <stdlib.h>#include <string.h>#include <iostream>#include <algorithm>#include 阅读全文