fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5. int n; cin >> n;
  6. cout << ((n + 1) * n) / 2;
  7.  
  8. return 0;
  9. }
  10.  
Success #stdin #stdout 0.01s 5280KB
stdin
10
stdout
55