C
等差数列
http://www.nowcoder.com/questionTerminal/f792cb014ed0474fb8f53389e7d9c07f
include<stdio.h>
int main(){
int n;
int sum=0;
while(scanf("%d",&n)!=EOF){
if(n>0){
sum=2n+3*n(n-1)/2;
printf("%d\n",sum);
}
}
return 0;
}