Solution to the problem number 335 of AceptaelReto - 335.

Any questions do not hesitate to contact.

#include <iostream>
using namespace std;

int main() {
    int T;
    cin >> T;
    while (T--) {
        long long n;
        cin >> n;
        cout << n*(n+1)*(n+2)/6 << endl;
    }
    return 0;
}

Don't miss anything.

Keep in touch with Isaac Lozano Osorio!