這題的測資只用int會溢位
#include<stdio.h> int main(){ long long int a; while(scanf("%lld",&a)!=EOF){ if(a<0) break; printf("%lld\n",1+(1+a)*a/2); }}