Problem: 2050C - Uninteresting Number
Language: C++23 (GCC 14-64, msys2)

Previous submission (verdict: Wrong answer on test 3):
#include<bits/stdc++.h>
using namespace std;

#define int long long


int get_sum(int n){
    int sum = 0;
    while(n>0){
        sum += (n%10);
        n=n/10;
    }
    return sum;
}


int get_two(int n){
    int a = 0;
    while(n>0){
        if(n%10 == 2) a++;
        n=n/10;
    }
    return a;
}

int get_three(int n){
    int a = 0;
    while(n>0){
        if(n%10 == 3) a++;
        n=n/10;
    }
    return a;
}


void solve(){
    int n;
    cin>>n;
    int sum = get_sum(n);
    int left = (((sum+8)/9)*9)  - sum;
    
    
    // cout<<"LEFT IS: "<<left<<endl;
    
    int find2 = get_two(n);
    int find3 = get_three(n);

    if(left == 0){
        cout<<"YES\n";
        return;
    }else if(left == 1){
        if(find2>=5 || (find3>=1 && find2>=2)){
            cout<<"YES\n";
            return;
        }
    }
    else if(left == 2 && find2>=1){
        cout<<"YES\n";
        return;
    }
    else if(left == 3){
        if(find3>=2 || (find2>=6) || (find3>=1 && find2>=3)){
            cout<<"YES\n";
            return;
        }
    }
    else if(left == 4 &&  find2>=2){
        cout<<"YES\n";
        return;
        
    }else if(left == 5){
        //make 14
        if(find2>=7 || (find3>=2 && find2>=1) || (find3>=1 && find2>=4)){
            cout<<"YES\n";
            return;
        }
    }
    else if(left == 6 && (find2>=3 || find3>=1)   ){
        cout<<"YES\n";
        return;
        
    }
    else if(left == 7){
        if(find2>=8 || (find3>=2 && find2>=2) || (find2>=1 && find2>=5)){
            cout<<"YES\n";
            return;
        }
    }
    
    else if(left == 8 && ( find2>=4  || (find3>=1 && find2>=1)) ){
        cout<<"YES\n";
        return;
        
    }
        cout<<"NO\n";
    
    
    
    
    
}


signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    
    int t;
    cin >> t;
    while (t--){
       solve();
    }
}

Submission (verdict: Wrong answer on test 3):
#include<bits/stdc++.h>
using namespace std;

#define int long long


int get_sum(int n){
    int sum = 0;
    while(n>0){
        sum += (n%10);
        n=n/10;
    }
    return sum;
}


int get_two(int n){
    int a = 0;
    while(n>0){
        if(n%10 == 2) a++;
        n=n/10;
    }
    return a;
}

int get_three(int n){
    int a = 0;
    while(n>0){
        if(n%10 == 3) a++;
        n=n/10;
    }
    return a;
}


void solve(){
    int n;
    cin>>n;
    int sum = get_sum(n);
    int left = (((sum+8)/9)*9)  - sum;
    
    
    // cout<<"LEFT IS: "<<left<<endl;
    
    int find2 = get_two(n);
    int find3 = get_three(n);

    if(left == 0){
        cout<<"YES\n";
        return;
    }else if(left == 1){
        if(find2>=5 || (find3>=1 && find2>=2)){
            cout<<"YES\n";
            return;
        }
    }
    else if(left == 2 && find2>=1){
        cout<<"YES\n";
        return;
    }
    else if(left == 3){
        if(find3>=2 || (find2>=6) || (find3>=1 && find2>=3)){
            cout<<"YES\n";
            return;
        }
    }
    else if(left == 4 &&  find2>=2){
        cout<<"YES\n";
        return;
        
    }else if(left == 5){
        //make 14
        if(find2>=7 || (find3>=2 && find2>=1) || (find3>=1 && find2>=4)){
            cout<<"YES\n";
            return;
        }
    }
    else if(left == 6 && (find2>=3 || find3>=1)   ){
        cout<<"YES\n";
        return;
        
    }
    else if(left == 7){
        if(find2>=8 || (find3>=2 && find2>=2) || (find3>=1 && find2>=5)){
            cout<<"YES\n";
            return;
        }
    }
    
    else if(left == 8 && ( find2>=4  || (find3>=1 && find2>=1)) ){
        cout<<"YES\n";
        return;
        
    }
        cout<<"NO\n";
    
    
    
    
    
}


signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    
    int t;
    cin >> t;
    while (t--){
       solve();
    }
}