fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. long long a,b,ans;
  5. scanf("%lld %lld",&a,&b);
  6. ans = ((a+b)*(b-a+1))/2;
  7. printf("%lld",ans);
  8. }
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
-200905570824370160