fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. long long n;
  6. cin >> n;
  7. n%2==0;
  8. cout<<n*(n+1)/2<<endl;
  9. return 0;
  10. }
Success #stdin #stdout 0.01s 5284KB
stdin
6
stdout
21