题解 | #数列求和#

数列求和

http://www.nowcoder.com/practice/6893484c04c24bfca1f606b1823a468d

public class Main {
    public static void main(String[] args) {

        //write your code here........
        long temp=10;
        long result=0;
        for(int i=0;i<10;i++){
            result+=(temp-1);
            temp=temp*10;
        }
        System.out.println(result);

    }
}

全部评论

相关推荐

牛客33727151号:不是哥们我以为驾照是段子呢
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务