For this Question: You are given an array of N integers <b>A<sub>1</sub>, A<sub>2</sub>,... , A<sub>N</sub></b> (1 <= A[i]. length <= 10<sup>5</sup>). You have to find the lone sum of each of these integers. 
To find the <b>lone sum</b> of any integer <b>a</b>, following steps are a must:
<ol>
<li>Take an integer b = Sum of digits of x.</li>
<li>If b < 10, lone sum = b and break</li>
<li>If b is at least 10, replace a with b, repeat from step 1.</li>
</ol>
For example:
Lone Sum of 799:
7 + 9 + 9 = 25
2 + 5 = 7.
Therefore, the lone Sum of 799 is 7.

For each integer j from 1 to 9, print the number of integers A<sub>i</sub> (1 <= i <= N) having their lone sum as j.First line of the input contains N, the size of array.
Second line of the input contains N space- separated integers.

<b>Constraints</b>
1 <= N <= 10<sup>5</sup>
1 <= A[i]. length <= 10<sup>5</sup>
Sum of lengths of A[i] over all i from 1 to N doesn't exceed 5*10<sup>5</sup>.Print 9 integers B<sub>1</sub>, B<sub>2</sub>,. , B<sub>9</sub> where B<sub>i</sub> is the number of integers A<sub>i</sub> whose <b>lone sum</b> is i.Sample Input:
5
79752 12793 13471 31973 113

Sample Output:
0 0 1 1 2 0 1 0 0

Explanation:
Lone sum of 79752 = 7 + 9 + 7 + 5 + 2 = 30
                                    = 3 + 0 = <b>3</b>
Lone sum of 12793 = 1 + 2 + 7 + 9 + 3 = 22
                                    = 2 + 2 = <b>4</b>
Lone sum of 13471 = 1 + 3 + 4  + 7 + 1 = 16
                                    = 1 + 6 = <b>7</b>
Lone sum of 31973 = 3 + 1 + 9 + 7 + 3 = 23
                                    = 2 + 3 = <b>5</b>
Lone sum of 113 = 1 + 1 + 3 = <b>5</b>
, I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;

#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);
#define int long long
#define pb push_back
#define ff first
#define ss second
#define endl '\n'
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
using T = pair<int, int>;
typedef long long ll;
const int mod = 1e9 + 7;
const int INF = 1e9;

string fun(int sum){
    string res = "";
    while(sum > 0){
        int x = sum%10;
        res += (char)(x + '0');
        sum /= 10;
    }
    reverse(all(res));
    return res;
}

int lone_sum(string a){
    int sum = 0;
    for(auto i : a) sum += i - '0';
    if(sum < 10) return sum;
    else return lone_sum(fun(sum));;
}

void solve() {
	int n;
    cin >> n;
    vector<string> a(n);
    vector<int> res(10);
    for(auto &i : a) cin >> i;
    for(int i = 0; i < n; i++){
        res[lone_sum(a[i])]++;
    }
    for(int i = 1; i <= 9; i++){
        if(i > 1){
            cout << ' ' << res[i];
        }
        else cout << res[i];
    }
}

signed main(){
    fast
    int t = 1;
    // cin >> t;
    for(int i = 1; i <= t; i++){
        solve();
        if(i != t) cout << endl;
    }
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?