1001
#include<iostream> #include<stdio.h> using namespace std; int main() { long long n; while(~scanf("%I64d",&n)) { printf("%I64d ",((1+n)*n)>>1); } return 0; }
1000
import java.io.*; import java.math.BigInteger; import java.util.*; public class hdu1000 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner cin=new Scanner (new BufferedInputStream(System.in)); PrintWriter cout=new PrintWriter(System.out); while(cin.hasNextBigInteger()) { BigInteger t=cin.nextBigInteger(); BigInteger m=cin.nextBigInteger(); BigInteger ans =0; ans=t.add(m); System.out.println(ans); } } }