pipioj专题

PIPIOJ 1043 数学王子

我的解法: #include<iostream>#include<cmath>using namespace std;double calculate(int num)//1+2+……+10n{double max = pow(10, num);double sum = 0;for (double i = 1; i <= max; i++){sum = sum + i;}retur