题目:http://acm.hdu.edu.cn/showproblem.php?pid=1001
import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner cin = new Scanner(System.in);
while(cin.hasNextInt()){
int sc=cin.nextInt();
int sum=0;
for(int i=1;i<=sc;i++){
sum+=i;
}
System.out.println(sum);
System.out.println();
}//end while
}
}