Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0;i < (n);i++)
using namespace std;
using ll = long long;
using pii = pair<int,int>;

const int INF = 2e9;

vector<pair<ll,ll>> prime_factorize(ll s){
    vector<ll,ll> res;
    for(ll p = 2;p*p <= s;p++){
        if(s % p != 0)continue;
        int num = 0;
        while(s % p == 0){
            num++;
            s /= p;
        }
        res.push_back(make_pair(p,num));
    }
    if(s != 1) res.push_back(make_pair(s,1));
    return res;
}

int main(){
    ll n;
    cin >> n;
    auto pf = prime_factorize(n);
    ll res = 0;
    for(auto p : pf){
        ll e = p.second;
        ll tmp = 0;
        ll cur = 1;
        while(e > cur) e -= cur++,tmp++;
        res += tmp;
    }
    cout << res << endl;
}

Compiler output:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<long long int, long long int>':
/usr/include/c++/14/bits/stl_vector.h:428:11:   required from 'class std::vector<long long int, long long int>'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
a.cc:10:19:   required from here
   10 |     vector<ll,ll> res;
      |                   ^~~
/usr/include/c++/14/bits/stl_vector.h:87:28: error: 'long long int' is not a class, struct, or union type
   87 |         rebind<_Tp>::other _Tp_alloc_type;
      |                            ^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:89:9: error: 'long long int' is not a class, struct, or union type
   89 |         pointer;
      |         ^~~~~~~
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'class std::vector<long long int, long long int>':
a.cc:10:19:   required from here
   10 |     vector<ll,ll> res;
      |                   ^~~
/usr/include/c++/14/bits/stl_vector.h:518:20: error: '_M_allocate' has not been declared in 'std::vector<long long int, long long int>::_Base'
  518 |       using _Base::_M_allocate;
      |                    ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:519:20: error: '_M_deallocate' has not been declared in 'std::vector<long long int, long long int>::_Base'
  519 |       using _Base::_M_deallocate;
      |                    ^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:521:20: error: '_M_get_Tp_allocator' has not been declared in 'std::vector<long long int, long long int>::_Base'
  521 |       using _Base::_M_get_Tp_allocator;
      |                    ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_Vector_impl() [with _Tp = long long int; _Alloc = long long int]':
a.cc:10:19:   required from here
   10 |     vector<ll,ll> res;
      |                   ^~~
/usr/include/c++/14/bits/stl_vector.h:136:24: error: 'long long int' is not a class, struct, or union type
  136 |         _Vector_impl() _GLIBCXX_NOEXCEPT_IF(
      |                        ^~~~~~~~~~~~~~~~~~~~
a.cc: In function 'std::vector<std::pair<long long int, long long int> > prime_factorize(ll)':
a.cc:18:22: error: no matching function for call to 'std::vector<long long int, long long int>::push_back(std::pair<long long int, int>)'
   18 |         res.push_back(make_pair(p,num));
      |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = long long int; _Alloc = long long int; value_type = long long int]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'std::pair<long long int, int>' to 'const std::vector<long long int, long long int>::value_type&' {aka 'const long long int&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = long long int; _Alloc = long long int; value_type = long long int]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'std::pair<long long int, int>' to 'std::vector<long long int, long long int>::value_type&&' {aka 'long long int&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
a.cc:20:29: error: no matching function for call to 'std::vector<long long int, long long int>::push_back(std::pair<long long int, int>)'
   20 |     if(s != 1) res.push_back(make_pair(s,1));
      |                ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = long long int; _Alloc = long long int; value_type = long long int]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'std::pair<long long int, int>' to 'const std::vector<long long int, long long int>::value_type&' {aka 'const long long int&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = long long int; _Alloc = long long int; value_type = long long int]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'std::pair<long long int, int>' to 'std::vector<long long int, long long int>::value_type&&' {aka 'long long int&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
a.cc:21:12: error: could not convert 'res' from 'vector<long long int,long long int>' to 'vector<std::pair<long long int, long long int>,std::allocator<std::pair<long long int, long long int> >>'
   21 |     return res;
      |            ^~~
      |            |
      |            vector<long long int,long long int>
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_Vector_impl() [with _Tp = long long int; _Alloc = long long int]':
/usr/include/c++/14/bits/stl_vector.h:314:7:   required from here
  314 |       _Vector_base() = default;
      |       ^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:141:26: error: 'long long int' is not a class, struct, or union type
  141 |         : _Tp_alloc_type()
      |                          ^