For this Question: John has N candies. He wants to crush all of them. He feels that it would be boring to crush the candies randomly, so he found a method to crush them. He divides these candies into a minimum number of groups such that no group contains more than 3 candies. He crushes one candy from each group. If there are G groups in a single step, then the cost incurred in crushing a single candy for that step is G dollars. After candy from each group is crushed, he takes all the remaining candies and repeats the process until he has no candies left. He hasn't started crushing yet, but he wants to know how much the total cost would be incurred. Can you help him?
You have to answer Q-independent queries.The first line of input contains a single integer, Q denoting the number of queries.
Next, Q lines contain a single integer N denoting the number of candies John has.

<b>Constraints</b>
1 <= Q <= 5 * 10^4
1 <= N <= 10^9Print Q lines containing total cost incurred for each query.Sample Input 1: 
1
4

Sample Output 1:
6

<b>Explanation:</b>
Query 1: First step John divides the candies into two groups of 3 and 1 candy respectively. Crushing one-one candy from both groups would cost him 2x2 = 4 dollars. He is now left with 2 candies. He divides it into one group. He crushes one candy for 1 dollar. Now, he is left with 1 candy. He crushes the last candy for 1 dollar. So, the total cost incurred is 4+1+1 = 6 dollars., I have written this Solution Code: #include "bits/stdc++.h"
using namespace std;
 
#define int long long int
#define ld long double
#define pi pair<int, int>
#define pb push_back
#define fi first
#define se second
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#ifndef LOCAL
#define endl '\n'
#endif 
 
const int N = 2e5 + 5;
const int mod = 1e9 + 7;
const int inf = 1e9 + 9;

int cost(int n){
	if(n == 0)	return 0;
	int g = (n-1)/3 + 1;
	return g*g + cost(n-g);
}

signed main() {
	IOS;
	clock_t start = clock();
	int q;	cin >> q;
	while(q--){
		int n;
		cin >> n;
		cout << cost(n) << endl;
	}
	cerr << (double)(clock() - start)*1000/CLOCKS_PER_SEC << " ms" << endl;
	return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?