题解 | #规律数列求和#
规律数列求和
https://www.nowcoder.com/practice/e05d1c142b3d4898be7183289a00ce5f
#include <iostream> using namespace std; int main() { long num=0; long sum=0; // write your code here...... for(int i=0;i<10;i++){ num=num*10; num+=9; sum+=num; } cout<<sum; return 0; }