Skip to content

Instantly share code, notes, and snippets.

@whatalnk
Created November 12, 2016 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whatalnk/9f1ecb366e1a3f2b2fd9e05bd3636b1a to your computer and use it in GitHub Desktop.
Save whatalnk/9f1ecb366e1a3f2b2fd9e05bd3636b1a to your computer and use it in GitHub Desktop.
AtCoder ABC #043 A [C++]
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int ret;
ret = (1 + n) * n / 2;
cout << ret << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment