题解 | #规律数列求和#
规律数列求和
https://www.nowcoder.com/practice/e05d1c142b3d4898be7183289a00ce5f
#include<stdio.h>
#include<math.h>
int main()
{
long long a, b=0;
int c;
for (c = 1; c <= 10; c++)
{
a = pow(10, c) - 1;
b +=a;
}
printf("%lld\n", b);
return 0;
}
