题解 | #牛牛的西格玛#
牛牛的西格玛
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); } }