rt.
#include <iostream> using namespace std; const int MOD = 998244353; int main() { int T; cin >> T; while (T--) { int n; cin >> n; cout << (1ll * n * (n + 1) * (2 * n + 1) / 6) % MOD << endl; } return 0; }