Solution to the problem number 428 of AceptaelReto - 428.

Any questions do not hesitate to contact.

#include <bits/stdc++.h>
using namespace std;
int cuatros=0;
void convertToQuinary(unsigned int n)
{
    if (n / 5 != 0) {
        convertToQuinary(n / 5);
    }
    if(n%5==4)
        cuatros++;
}
int main()
{
    int cases,number;
    cin>>cases;
    while(cases--)
    {
        cin>>number;
        convertToQuinary(number);
        if(cuatros>1)
            cout<<"SI\n";
        else
            cout<<"NO\n";
        cuatros=0;
    }
    return 0;
}

Don't miss anything.

Keep in touch with Isaac Lozano Osorio!