题解 | #数列求和#
数列求和
https://www.nowcoder.com/practice/6893484c04c24bfca1f606b1823a468d
public class Main { public static void main(String[] args) { //write your code here........ long sum = 0; for (long i = 10; i <= 10000000000L; i *= 10) { sum += i - 1; } System.out.println(sum); } }