Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <math.h>
- #include <string>
- #include <algorithm>
- #include <set>
- using namespace ::std;
- int main()
- {
- long long intellect, sum;
- cin >> intellect;
- if (intellect % 2 == 0)
- sum = (intellect + 1)*(intellect / 2);
- else
- sum = ((intellect + 1)*(intellect / 2) + intellect / 2 + 1);
- sum = sum*(intellect + 2);
- cout << sum;
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment