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