Problem: 2050C - Uninteresting Number
Language: c++17 

Code 1:
#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define pb push_back
int main(){
   ll t,ans=0;
   cin>>t;
   string n;
   for(ll i=0; i<t; i++){
      cin>>n;
      ll m=n.size();
      ans=0;
      map<char, ll> map;
      for(ll i=0; i<m; i++){
         ans+=(n[i]-48);
         if(n[i]=='2'){
            map['2']++;
         }
         else if(n[i]=='3'){
            map['3']++;
         }
      }
      ans=ans%9;
      if(ans==0 ){
         cout<<"YES"<<"\n";
         continue;         
      }
      else if(ans==1){
         if(map['2']>=4){
            cout<<"YES"<<"\n";
            continue;
         }
         if(map['3']>=1 && map['2']>=1){
            cout<<"YES"<<"\n";
            continue;
         }
      }
      else if(ans==2){
         if(map['3']>=2 && map['2']>=2){
            cout<<"YES"<<"\n";
            continue;
         }
         if(map['2']>=8){
            cout<<"YES"<<"\n";
            continue;
         }
         if(map['3']>=1 && map['2']>=5){
            cout<<"YES"<<"\n";
            continue;            
         }
      }
      else if(ans==3){
         if(map['3']>=1){
            cout<<"YES"<<"\n";
            continue;            
         }
         if(map['2']>=3){
            cout<<"YES"<<"\n";
            continue;            
         }
      }
      else if(ans==4){
         if(map['3']>=2 && map['2']>=1){
            cout<<"YES"<<"\n";
            continue;            
         }
         if(map['2']>=7){
            cout<<"YES"<<"\n";
            continue;
         }
         if(map['3']>=1 && map['2']>=4){
            cout<<"YES"<<"\n";
            continue;            
         }
      }
      else if(ans==5){
         if(map['2']>=2){
            cout<<"YES"<<"\n";
            continue;
         }
      }
      else if(ans==6){
         if(map['3']>=2 ||map['2']>=6 ){
            cout<<"YES"<<"\n";
            continue;
         }
         if(map['3']>=1 && map['2']>=3){
            cout<<"YES"<<"\n";
            continue;
         }
      }
      else if(ans==7){
         if(map['2']>=1){
            cout<<"YES"<<"\n";
            continue;
         }
      }
      else if(ans==8){
         if(map['2']>=5){
            cout<<"YES"<<"\n";
            continue;
         }
         if(map['3']>=1 && map['2']>=2){
            cout<<"YES"<<"\n";
            continue;
         }
      }
      cout<<"NO"<<"\n";
   }
   return 0;
}

Code 2:
#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define pb push_back
int main(){
   ll t,ans=0;
   cin>>t;
   string n;
   for(ll i=0; i<t; i++){
      cin>>n;
      ll m=n.size();
      ans=0;
      map<char, ll> map;
      for(ll i=0; i<m; i++){
         ans+=(n[i]-48);
         if(n[i]=='2'){
            map['2']++;
         }
         else if(n[i]=='3'){
            map['3']++;
         }
      }
      ans=ans%9;
      if(ans==0){
         cout<<"YES"<<"\n";
         continue;         
      }
      else if(ans==1){
         if(map['2']>=4){
            cout<<"YES"<<"\n";
            continue;
         }
         else if(map['3']>=1 && map['2']>=1){
            cout<<"YES"<<"\n";
            continue;
         }
      }
      else if(ans==2){
         if(map['3']>=2 && map['2']>=2){
            cout<<"YES"<<"\n";
            continue;
         }
         if(map['2']>=8){
            cout<<"YES"<<"\n";
            continue;
         }
         if(map['3']>=1 && map['2']>=5){
            cout<<"YES"<<"\n";
            continue;            
         }
      }
      else if(ans==3){
         if(map['3']>=1){
            cout<<"YES"<<"\n";
            continue;            
         }
         else if(map['2']>=3){
            cout<<"YES"<<"\n";
            continue;            
         }
      }
      else if(ans==4){
         if(map['3']>=2 && map['2']>=1){
            cout<<"YES"<<"\n";
            continue;            
         }
         else if(map['2']>=7){
            cout<<"YES"<<"\n";
            continue;
         }
      }
      else if(ans==5){
         if(map['2']>=2){
            cout<<"YES"<<"\n";
            continue;
         }
      }
      else if(ans==6){
         if(map['3']>=2 ||map['2']>=6 ){
            cout<<"YES"<<"\n";
            continue;
         }
         else if(map['3']>=1 && map['2']>=3){
            cout<<"YES"<<"\n";
            continue;
         }
      }
      else if(ans==7){
         if(map['2']>=1){
            cout<<"YES"<<"\n";
            continue;
         }
      }
      else if(ans==8){
         if(map['2']>=5){
            cout<<"YES"<<"\n";
            continue;
         }
         else if(map['3']>=1 && map['2']>=2){
            cout<<"YES"<<"\n";
            continue;
         }
      }
      cout<<"NO"<<"\n";
   }
   return 0;
}

Answer: 1