1390D2.cpp 241 B

12345678910111213141516
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main() {
  4. ///Input Process Output
  5. int N;
  6. cin >> N;
  7. while (N--) {
  8. int n = 5;
  9. cin >> n;
  10. cout << n * (n + 1) * (n + 2) / 6 << endl;
  11. }
  12. return 0;
  13. }