Source Code
#include <vector>
#include <string>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <stack>
#include <queue>
#include <iterator>
#include <deque>
#include <set>
#include <map>
#include <cmath>
#include <unordered_map>
#include <unordered_set>
#include <numeric>
#include <fstream>
#include <functional>
#include <iomanip>
#include <cctype>
#include <utility>
#include <bitset>
#include <tuple>
#include <sstream>
#include <math.h>

using namespace std;
#define ll long long
#define lll long long int
#define PI 3.1415926535897
#define ld long double
#define fast ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define fr first
#define sc second
#define all(x) x.begin(),x.end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(X) ((ll)(X).size())
#define pll pair<ll, ll>
#define pi pair<int, int>
#define pb push_back
#define in insert
#define al(it) it.fr << " " << it.sc << "\n"
#define _cout(v)  for(auto f : v ) cout << f << " " ;
#define _cin(v)   for(auto &it : v)cin >> it ;
int main()
{
	ll t; cin >> t;
	while (t--) {
		ll n; cin >> n;
		ll k1 =n/2 ,k2= pow(n, 2)+1;
		ll k = k1 *k2;
		
		string s = to_string(k);



		cout << s << "\n";
	}
	return 0;
}
Copy
Ali's Game Ayman_Attili
GNU G++17
2 ms
244 KB
Wrong Answer