题解 | #数列求和#
数列求和
http://www.nowcoder.com/practice/6893484c04c24bfca1f606b1823a468d
public class Main { public static void main(String[] args) {
//write your code here........
String s="9"; Long l= Long.valueOf(0); for(int i=0;i<10;i++){ l=Long.parseLong(s)+l; s=s+"9"; } System.out.println(l);
}
}