#include<bits/stdc++.h>
using namespace std;
int main() {
string a,b,v;
cin>>a;
sort(a.begin(),a.end());
b=a;
b.erase(unique(b.begin(), b.end()),b.end());
for(int i=0 ; i <b.length();i++)
{
int n= count (a.begin(),a.end(),b[i]);
cout << b[i]<<n;
}
return 0;
}
I would like to know what is wrong in this problem ?
out of 4 test cases , There are 2 test cases are passed but test 2 test case got failed. Please advise.