题解 | #牛牛的西格玛#

牛牛的西格玛

http://www.nowcoder.com/practice/c6b750ee8853484f8dbf14b9531b501f

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        int target = 0;
        for(int index = 1; index <= num; index++){
            target += index;
        }
        System.out.print(target);
    }
}

全部评论

相关推荐

牛客73617529...:无端端被你骂一句
点赞 评论 收藏
分享
07-07 12:47
门头沟学院 Java
码农索隆:竟然还真有卡体检报告的
点赞 评论 收藏
分享
苍蓝星上艾露:这简历。。。可以试试我写的开源简历优化工具https://github.com/weicanie/prisma-ai
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-11 11:29
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务