Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <algorithm>
- #include <cmath>
- #include <string>
- #include <vector>
- #include <set>
- using namespace std;
- int summa(int x) {
- int sm = 0;
- for (int i = x; i < 3 * x; i++) {
- sm += i - 2;
- }
- return sm;
- }
- int main() {
- int k = 2;
- int ans = 1;
- for (int i = 2; i < 6; i++) {
- ans *= summa(k);
- k++;
- }
- cout << ans;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement